|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.router.transport.udp.OutboundMessageState
public class OutboundMessageState
Maintain the outbound fragmentation for resending
Field Summary | |
---|---|
static int |
MAX_FRAGMENTS
|
Constructor Summary | |
---|---|
OutboundMessageState(I2PAppContext context)
|
Method Summary | |
---|---|
boolean |
acked(ACKBitfield bitfield)
Ack all the fragments in the ack list. |
void |
fragment(int fragmentSize)
Prepare the message for fragmented delivery, using no more than fragmentSize bytes per fragment. |
int |
fragmentSize(int fragmentNum)
|
int |
getFragmentCount()
how many fragments in the message |
int |
getFragmentSize()
|
long |
getLifetime()
|
int |
getMaxSends()
|
OutNetMessage |
getMessage()
|
long |
getMessageId()
|
long |
getNextSendTime()
|
PeerState |
getPeer()
|
int |
getPushCount()
|
int |
getUnackedSize()
|
boolean |
initialize(I2NPMessage msg,
PeerState peer)
|
boolean |
initialize(OutNetMessage msg)
|
boolean |
initialize(OutNetMessage m,
I2NPMessage msg)
|
boolean |
isComplete()
|
boolean |
isExpired()
|
boolean |
isFragmented()
|
boolean |
needsSending(int fragment)
|
void |
push()
note that we have pushed the message fragments |
void |
releaseResources()
|
void |
setNextSendTime(long when)
|
void |
setPeer(PeerState peer)
|
boolean |
shouldSend(int fragmentNum)
should we continue sending this fragment? |
java.lang.String |
toString()
|
int |
writeFragment(byte[] out,
int outOffset,
int fragmentNum)
Write a part of the the message onto the specified buffer. |
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 OutboundMessageState(I2PAppContext context)
Method Detail |
---|
public boolean initialize(OutNetMessage msg)
public boolean initialize(I2NPMessage msg, PeerState peer)
public boolean initialize(OutNetMessage m, I2NPMessage msg)
public void releaseResources()
public OutNetMessage getMessage()
public long getMessageId()
public PeerState getPeer()
public void setPeer(PeerState peer)
public boolean isExpired()
public boolean isComplete()
public int getUnackedSize()
public boolean needsSending(int fragment)
public long getLifetime()
public boolean acked(ACKBitfield bitfield)
public long getNextSendTime()
public void setNextSendTime(long when)
public int getMaxSends()
public int getPushCount()
public void push()
public boolean isFragmented()
public void fragment(int fragmentSize)
public int getFragmentCount()
public int getFragmentSize()
public boolean shouldSend(int fragmentNum)
public int fragmentSize(int fragmentNum)
public int writeFragment(byte[] out, int outOffset, int fragmentNum)
out
- target to writeoutOffset
- into outOffset to begin writingfragmentNum
- fragment to write (0 indexed)
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |