|
|||||||||
Atavism Version 2018.1 | AGIS API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatavism.server.engine.Event
atavism.server.events.FragmentedMessage
public class FragmentedMessage
fragmented message sometimes the an event is split up into seperate subevents, stored in this fragmentedmessage. this is done because large packets may be dropped by network routers
Field Summary | |
---|---|
byte[] |
data
|
protected static Logger |
log
|
Constructor Summary | |
---|---|
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) |
Method Summary | |
---|---|
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()
|
Methods inherited from class atavism.server.engine.Event |
---|
getBuffer, getConnection, getEnqueueTime, getObjectOid, setBuffer, setConnection, setEnqueueTime, setEntity, setObject, setObjectOid |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public byte[] data
protected static final Logger log
Constructor Detail |
---|
public FragmentedMessage()
public FragmentedMessage(AOByteBuffer buf, ClientConnection con)
public FragmentedMessage(byte[] data, int start, int end, int msgId, int seqNum)
Method Detail |
---|
public java.lang.String getName()
getName
in class Event
public java.lang.String toString()
toString
in class Event
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()
toBytes
in class Event
public static int getNextId()
public static void main(java.lang.String[] args)
|
Copyright © 2018 Dragonsan Studios Sp. z o.o. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |