Package org.activecomponents.udp
Class MessagePart
- java.lang.Object
-
- org.activecomponents.udp.MessagePart
-
public class MessagePart extends java.lang.Object
A message part in transmission.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.net.DatagramPacket
dgp
The packet.protected long
id
Packet ID.protected OutgoingMessage
message
Message containing this part.protected boolean
resend
Flag if the part has been send more than once.protected long
resendtime
Part scheduled resend time.protected long
senttime
Part sent time.
-
Constructor Summary
Constructors Constructor Description MessagePart(long id, java.net.DatagramPacket dgp, OutgoingMessage message)
Creates a queued message part.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getId()
Gets the ID.OutgoingMessage
getMessage()
Returns the message containing this part.java.net.DatagramPacket
getPacket()
Gets the packet.long
getResendTime()
Gets the resendtime.long
getSentTime()
Gets the senttime.boolean
isResend()
Gets the resend.void
setResend(boolean resend)
Sets the resend.void
setResentTime(long resendtime)
Sets the resendtime.void
setSentTime(long senttime)
Sets the senttime.
-
-
-
Field Detail
-
message
protected OutgoingMessage message
Message containing this part.
-
id
protected long id
Packet ID.
-
senttime
protected long senttime
Part sent time.
-
resendtime
protected long resendtime
Part scheduled resend time.
-
dgp
protected java.net.DatagramPacket dgp
The packet.
-
resend
protected boolean resend
Flag if the part has been send more than once.
-
-
Constructor Detail
-
MessagePart
public MessagePart(long id, java.net.DatagramPacket dgp, OutgoingMessage message)
Creates a queued message part.
-
-
Method Detail
-
getId
public long getId()
Gets the ID.- Returns:
- The ID.
-
getMessage
public OutgoingMessage getMessage()
Returns the message containing this part.- Returns:
- The message.
-
getSentTime
public long getSentTime()
Gets the senttime.- Returns:
- The senttime
-
setSentTime
public void setSentTime(long senttime)
Sets the senttime.- Parameters:
senttime
- The senttime to set
-
getResendTime
public long getResendTime()
Gets the resendtime.- Returns:
- The resendtime
-
setResentTime
public void setResentTime(long resendtime)
Sets the resendtime.- Parameters:
resendtime
- The resendtime to set
-
getPacket
public java.net.DatagramPacket getPacket()
Gets the packet.- Returns:
- The packet.
-
isResend
public boolean isResend()
Gets the resend.- Returns:
- The resend
-
setResend
public void setResend(boolean resend)
Sets the resend.- Parameters:
resend
- The resend to set
-
-