Package org.activecomponents.udp
Class IncomingMessage
- java.lang.Object
-
- org.activecomponents.udp.IncomingMessage
-
public class IncomingMessage extends java.lang.ObjectAn incoming message.
-
-
Field Summary
Fields Modifier and Type Field Description protected byte[][]dataMessage data.protected booleaninternalFlag indicating internal messages.protected java.util.Set<java.lang.Integer>missingpartsSet of missing parts.
-
Constructor Summary
Constructors Constructor Description IncomingMessage(int size, boolean internal)Creates a new internal message.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPart(int partnum, byte[] buffer, int offset)Adds a part to the message.byte[]getMessage()Returns the full message.booleanisDone()Returns true if the message is complete.booleanisInternal()
-
-
-
Method Detail
-
addPart
public void addPart(int partnum, byte[] buffer, int offset)Adds a part to the message.- Parameters:
partnum- The part number.buffer- The buffer containing part data.offset- Offset position of the part data.
-
isDone
public boolean isDone()
Returns true if the message is complete.- Returns:
- True, if complete.
-
isInternal
public boolean isInternal()
-
getMessage
public byte[] getMessage()
Returns the full message.- Returns:
- The message.
-
-