Package org.activecomponents.udp
Class IncomingMessage
- java.lang.Object
-
- org.activecomponents.udp.IncomingMessage
-
public class IncomingMessage extends java.lang.Object
An incoming message.
-
-
Field Summary
Fields Modifier and Type Field Description protected byte[][]
data
Message data.protected boolean
internal
Flag indicating internal messages.protected java.util.Set<java.lang.Integer>
missingparts
Set 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 void
addPart(int partnum, byte[] buffer, int offset)
Adds a part to the message.byte[]
getMessage()
Returns the full message.boolean
isDone()
Returns true if the message is complete.boolean
isInternal()
-
-
-
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.
-
-