public class FragmentedMessage extends Event
Modifier and Type | Field and Description |
---|---|
byte[] |
data |
protected static Logger |
log |
Constructor and Description |
---|
FragmentedMessage() |
FragmentedMessage(AOByteBuffer buf,
ClientConnection con) |
FragmentedMessage(byte[] data,
int start,
int end,
int msgId,
int seqNum)
start starts with 0
index is its relative pos in the list of fragmented messages which
make up the whole message (starting with 0)
|
Modifier and Type | Method and Description |
---|---|
static java.util.List<FragmentedMessage> |
fragment(AOByteBuffer byteBuf,
int maxBytes) |
static java.util.List<FragmentedMessage> |
fragment(byte[] buf,
int maxBytes)
fragments the event - each fragment should not exceed more than
maxBytes of DATA (does not care about networking headers
|
static int |
fragmentCount(int bufLen,
int maxBytes)
provide an entry point that returns the count of fragments for
a message, so we can know ahead of time if adding the fragments
will exceed the number of unacked packets.
|
java.lang.String |
getName() |
static int |
getNextId() |
static void |
main(java.lang.String[] args) |
void |
parseBytes(AOByteBuffer buf)
load this event from the passed in buffer
called by the constructor
|
AOByteBuffer |
toBytes() |
java.lang.String |
toString() |
getBuffer, getConnection, getEnqueueTime, getObjectOid, setBuffer, setConnection, setEnqueueTime, setEntity, setObject, setObjectOid
public byte[] data
protected static final Logger log
public FragmentedMessage()
public FragmentedMessage(AOByteBuffer buf, ClientConnection con)
public FragmentedMessage(byte[] data, int start, int end, int msgId, int seqNum)
public static int fragmentCount(int bufLen, int maxBytes)
public static java.util.List<FragmentedMessage> fragment(AOByteBuffer byteBuf, int maxBytes)
public static java.util.List<FragmentedMessage> fragment(byte[] buf, int maxBytes)
public void parseBytes(AOByteBuffer buf)
Event
parseBytes
in interface EventParser
parseBytes
in class Event
public AOByteBuffer toBytes()
public static int getNextId()
public static void main(java.lang.String[] args)