public class NeighborRPC extends ReplyHandler
Modifier and Type | Field and Description |
---|---|
static int |
NEIGHBOR_SIZE |
Constructor and Description |
---|
NeighborRPC(PeerBean peerBean,
ConnectionBean connectionBean) |
Modifier and Type | Method and Description |
---|---|
FutureResponse |
closeNeighbors(PeerAddress remotePeer,
Number160 locationKey,
Number160 domainKey,
Collection<Number160> contentKeys,
Message.Type type,
ChannelCreator channelCreator,
boolean forceTCP)
Requests close neighbors from the remote peer.
|
Message |
handleResponse(Message message,
boolean sign)
If the message is OK, that has been previously checked by the user using
checkMessage, a reply to the message is generated here.
|
createMessage, createResponseMessage, exceptionCaught, forwardMessage, getConnectionBean, getPeerBean, registerIoHandler, setSignReply
bindRequested, channelBound, channelClosed, channelConnected, channelDisconnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, closeRequested, connectRequested, disconnectRequested, handleDownstream, handleUpstream, messageReceived, setInterestOpsRequested, unbindRequested, writeComplete, writeRequested
public static final int NEIGHBOR_SIZE
public NeighborRPC(PeerBean peerBean, ConnectionBean connectionBean)
public FutureResponse closeNeighbors(PeerAddress remotePeer, Number160 locationKey, Number160 domainKey, Collection<Number160> contentKeys, Message.Type type, ChannelCreator channelCreator, boolean forceTCP)
remotePeer
- The remote peer to send this requestlocationKey
- The location keydomainKey
- The domain keycontentKeys
- For get() and remove() one can provide the content keys and
the remote peer indicates if those keys are on that peer.type
- The type of the neigbor request:
isDigest
- Set to true to return a digest of the remote contentchannelCreator
- The channel creator that creates connectionsforceTCP
- Set to true if the communication should be TCP, default is UDPpublic Message handleResponse(Message message, boolean sign) throws IOException
ReplyHandler
handleResponse
in class ReplyHandler
message
- Request messageIOException
Copyright © 2013. All Rights Reserved.