public interface PeerContext
Modifier and Type | Method and Description |
---|---|
void |
forceDisconnect()
Force the peer to disconnect.
|
long |
getBootID()
Get the current boot ID.
|
OutgoingPacketMangler |
getOutgoingMangler()
Get the OutgoingPacketMangler which encrypts outgoing packets to this node
|
Peer |
getPeer() |
SocketHandler |
getSocketHandler()
Get the SocketHandler which handles incoming packets from this node
|
PacketThrottle |
getThrottle()
Get the PacketThrottle for the node's current address for the standard packet size (if the
address changes then we get a new throttle).
|
int |
getThrottleWindowSize() |
int |
getVersionNumber()
Peer version, if this is supported, else -1
|
java.lang.ref.WeakReference<? extends PeerContext> |
getWeakRef()
Get a WeakReference to this context.
|
boolean |
isConnected()
Is the peer connected? Have we established the session link?
|
boolean |
isRoutable()
Is the peer connected? are we able to route requests to it?
|
void |
reportThrottledPacketSendTime(long time,
boolean realTime) |
MessageItem |
sendAsync(Message msg,
AsyncMessageCallback cb,
ByteCounter ctr)
Send a message to the node
|
java.lang.String |
shortToString()
Compact toString()
|
void |
transferFailed(java.lang.String reason,
boolean realTime)
Report a transfer failure
|
boolean |
unqueueMessage(MessageItem item) |
Peer getPeer()
void forceDisconnect()
boolean isConnected()
boolean isRoutable()
int getVersionNumber()
MessageItem sendAsync(Message msg, AsyncMessageCallback cb, ByteCounter ctr) throws NotConnectedException
NotConnectedException
long getBootID()
PacketThrottle getThrottle()
SocketHandler getSocketHandler()
OutgoingPacketMangler getOutgoingMangler()
java.lang.ref.WeakReference<? extends PeerContext> getWeakRef()
java.lang.String shortToString()
void transferFailed(java.lang.String reason, boolean realTime)
boolean unqueueMessage(MessageItem item)
void reportThrottledPacketSendTime(long time, boolean realTime)
int getThrottleWindowSize()