|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.router.tunnel.PendingGatewayMessage
class PendingGatewayMessage
Stores all the state for an unsent or partially-sent message
Field Summary | |
---|---|
protected long |
_created
|
protected long |
_expiration
|
protected int |
_fragmentNumber
|
protected long |
_messageId
|
protected int |
_offset
|
protected byte[] |
_remaining
|
protected Hash |
_toRouter
|
protected TunnelId |
_toTunnel
|
Constructor Summary | |
---|---|
PendingGatewayMessage(I2NPMessage message,
Hash toRouter,
TunnelId toTunnel)
|
Method Summary | |
---|---|
void |
addMessageId(long id)
Add an ID to the list of the TunnelDataMssages this message was fragmented into. |
void |
drop()
For CDQ |
byte[] |
getData()
raw unfragmented message to send |
long |
getEnqueueTime()
For CDQ |
long |
getExpiration()
|
int |
getFragmentNumber()
which fragment are we working on (0 for the first fragment) |
long |
getLifetime()
|
long |
getMessageId()
|
List<Long> |
getMessageIds()
The IDs of the TunnelDataMssages this message was fragmented into. |
int |
getOffset()
index into the data to be sent |
Hash |
getToRouter()
may be null |
TunnelId |
getToTunnel()
may be null |
void |
incrementFragmentNumber()
ok, fragment sent, increment what the next will be |
void |
setEnqueueTime(long now)
For CDQ |
void |
setOffset(int offset)
move the offset |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final Hash _toRouter
protected final TunnelId _toTunnel
protected final long _messageId
protected final long _expiration
protected final byte[] _remaining
protected int _offset
protected int _fragmentNumber
protected final long _created
Constructor Detail |
---|
public PendingGatewayMessage(I2NPMessage message, Hash toRouter, TunnelId toTunnel)
Method Detail |
---|
public Hash getToRouter()
public TunnelId getToTunnel()
public long getMessageId()
public long getExpiration()
public byte[] getData()
public int getOffset()
public void setOffset(int offset)
public long getLifetime()
public int getFragmentNumber()
public void incrementFragmentNumber()
public void addMessageId(long id)
public List<Long> getMessageIds()
public void setEnqueueTime(long now)
setEnqueueTime
in interface CDQEntry
public long getEnqueueTime()
getEnqueueTime
in interface CDQEntry
public void drop()
drop
in interface CDQEntry
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |