class PendingGatewayMessage extends Object implements CDQEntry
| Modifier and Type | Field and Description |
|---|---|
protected long | _createdwhen this message was created |
protected long | _expirationthe message expiration |
protected int | _fragmentNumberwhich fragment are we working on |
protected long | _messageIdthe message ID |
protected int | _offsetindex into the data to be sent |
protected byte[] | _remainingraw unfragmented message data |
protected Hash | _toRouterthe destination router |
protected TunnelId | _toTunnelthe destination tunnel |
| Constructor and Description |
|---|
PendingGatewayMessage(I2NPMessage message,
Hash toRouter,
TunnelId toTunnel)PendingGatewayMessage. |
| Modifier and Type | Method and Description |
|---|---|
void | addMessageId(long id)Add an ID to the list of the TunnelDataMssages this message was fragmented into. |
void | drop()For CDQ |
byte[] | getData()The 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()The index into the data to be sent. |
Hash | getToRouter()The destination router. |
TunnelId | getToTunnel()The destination tunnel. |
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()toString. |
protected final long _created
protected final long _expiration
protected int _fragmentNumber
protected final long _messageId
protected volatile int _offset
protected final byte[] _remaining
protected final Hash _toRouter
protected final TunnelId _toTunnel
public PendingGatewayMessage(I2NPMessage message, Hash toRouter, TunnelId toTunnel)
public void addMessageId(long id)
id - the message ID to addpublic byte[] getData()
public long getEnqueueTime()
getEnqueueTime in interface CDQEntrypublic long getExpiration()
public int getFragmentNumber()
public long getLifetime()
public long getMessageId()
public List<Long> getMessageIds()
public int getOffset()
public Hash getToRouter()
public TunnelId getToTunnel()
public void incrementFragmentNumber()
public void setEnqueueTime(long now)
setEnqueueTime in interface CDQEntrynow - the enqueue timestamppublic void setOffset(int offset)
offset - the new offset value