public class HopConfig extends Object
| Constructor and Description |
|---|
HopConfig()Creates a new HopConfig with default values |
| Modifier and Type | Method and Description |
|---|---|
int | getAllocatedBW()The bandwidth allocated for this hop. |
(package private) int | getAndResetRecentMessagesCount()This returns the number of processed messages since the last time this was called,
and resets the count. |
long | getCreation()When was this tunnel created (in ms since the epoch)? |
long | getExpiration()When does this tunnel expire (in ms since the epoch)? |
SessionKey | getIVKey()What key encrypts the preIV before passing it on? |
SessionKey | getLayerKey()What key encrypts the layer before passing it on? |
int | getProcessedMessagesCount()Processed messages count. |
Hash | getReceiveFrom()What is the previous peer in the tunnel (null if gateway)? |
TunnelId | getReceiveTunnel()What tunnel ID are we receiving on? (null if uninitialized) |
long | getReceiveTunnelId()What tunnel ID are we receiving on? (0 if uninitialized) |
int | getRecentMessagesCount()This returns the number of processed messages since
the last time getAndResetRecentMessagesCount() was called. |
Hash | getSendTo()What is the next peer in the tunnel (null if endpoint)? |
TunnelId | getSendTunnel()What is the next tunnel ID we are sending to? (null if endpoint) |
long | getSendTunnelId()What is the next tunnel ID we are sending to? (0 if endpoint) |
void | incrementProcessedMessages()Take note of a message being pumped through this tunnel. |
void | setAllocatedBW(int bw)The bandwidth allocated for this hop. |
void | setCreation(long when)The tunnel creation time, in ms since the epoch. |
void | setExpiration(long when)The tunnel expiration time, in ms since the epoch. |
void | setIVKey(SessionKey key)The key to encrypt the IV with before passing it on. |
void | setLayerKey(SessionKey key)The key to encrypt the layer with before passing it on. |
void | setReceiveFrom(Hash from)Do not set for gateway |
void | setReceiveTunnelId(long id)The receive tunnel ID, from 1 to 0xffffffff. |
void | setReceiveTunnelId(TunnelId id)The tunnel ID to receive messages on. |
void | setSendTo(Hash to)Do not set for endpoint |
void | setSendTunnelId(long id)The send tunnel ID, from 1 to 0xffffffff. |
void | setSendTunnelId(TunnelId id)The tunnel ID to send messages through. |
String | toString() |
public int getAllocatedBW()
int getAndResetRecentMessagesCount()
public long getCreation()
public long getExpiration()
public SessionKey getIVKey()
public SessionKey getLayerKey()
public int getProcessedMessagesCount()
public Hash getReceiveFrom()
public TunnelId getReceiveTunnel()
public long getReceiveTunnelId()
public int getRecentMessagesCount()
public Hash getSendTo()
public TunnelId getSendTunnel()
public long getSendTunnelId()
public void incrementProcessedMessages()
public void setAllocatedBW(int bw)
bw - Bpspublic void setCreation(long when)
public void setExpiration(long when)
public void setIVKey(SessionKey key)
public void setLayerKey(SessionKey key)
public void setReceiveFrom(Hash from)
from - the previous peer hashpublic void setReceiveTunnelId(long id)
id - 1 to 0xffffffffIllegalArgumentException - if less than or equal to zero or greater than max valuepublic void setReceiveTunnelId(TunnelId id)
id - the tunnel IDpublic void setSendTo(Hash to)
to - the next peer hashpublic void setSendTunnelId(long id)
id - 1 to 0xffffffffIllegalArgumentException - if less than or equal to zero or greater than max valuepublic void setSendTunnelId(TunnelId id)
id - the tunnel ID