|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.router.transport.udp.InboundMessageState
class InboundMessageState
Hold the raw data fragments of an inbound message. Warning - there is no synchronization in this class, take care in InboundMessageFragments to avoid use-after-release, etc.
Field Summary | |
---|---|
static int |
MAX_FRAGMENTS
|
Constructor Summary | |
---|---|
InboundMessageState(RouterContext ctx,
long messageId,
Hash from)
|
Method Summary | |
---|---|
ACKBitfield |
createACKBitfield()
|
void |
drop()
For CDQ |
int |
getCompleteSize()
|
long |
getEnqueueTime()
For CDQ |
int |
getFragmentCount()
|
ByteArray[] |
getFragments()
|
Hash |
getFrom()
|
long |
getLifetime()
|
long |
getMessageId()
|
boolean |
isComplete()
May not be valid after released. |
boolean |
isExpired()
|
boolean |
receiveFragment(UDPPacketReader.DataReader data,
int dataFragment)
Read in the data from the fragment. |
void |
releaseResources()
|
void |
setEnqueueTime(long now)
For CDQ |
String |
toString()
May not be valid if released, or may NPE on race with release, use with care in exception text |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int MAX_FRAGMENTS
Constructor Detail |
---|
public InboundMessageState(RouterContext ctx, long messageId, Hash from)
Method Detail |
---|
public boolean receiveFragment(UDPPacketReader.DataReader data, int dataFragment)
public boolean isComplete()
public boolean isExpired()
public long getLifetime()
public void setEnqueueTime(long now)
setEnqueueTime
in interface CDQEntry
public long getEnqueueTime()
getEnqueueTime
in interface CDQEntry
public void drop()
drop
in interface CDQEntry
public Hash getFrom()
public long getMessageId()
public int getCompleteSize()
IllegalStateException
- if released or not isComplete()public ACKBitfield createACKBitfield()
public void releaseResources()
public ByteArray[] getFragments()
IllegalStateException
- if releasedpublic int getFragmentCount()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |