Package org.activecomponents.udp
Class MessagePart
- java.lang.Object
-
- org.activecomponents.udp.MessagePart
-
public class MessagePart extends java.lang.ObjectA message part in transmission.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.net.DatagramPacketdgpThe packet.protected longidPacket ID.protected OutgoingMessagemessageMessage containing this part.protected booleanresendFlag if the part has been send more than once.protected longresendtimePart scheduled resend time.protected longsenttimePart 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 longgetId()Gets the ID.OutgoingMessagegetMessage()Returns the message containing this part.java.net.DatagramPacketgetPacket()Gets the packet.longgetResendTime()Gets the resendtime.longgetSentTime()Gets the senttime.booleanisResend()Gets the resend.voidsetResend(boolean resend)Sets the resend.voidsetResentTime(long resendtime)Sets the resendtime.voidsetSentTime(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
-
-