public class QuitRPC extends DispatchHandler
| Constructor and Description |
|---|
QuitRPC(PeerBean peerBean,
ConnectionBean connectionBean)
Constructor that registers this RPC with the message handler.
|
| Modifier and Type | Method and Description |
|---|---|
QuitRPC |
addPeerStatusListener(PeerStatusListener listener)
Add a peer status listener that gets notified when a peer is offline.
|
void |
handleResponse(Message message,
PeerConnection peerConnection,
boolean sign,
Responder responder)
If the message is OK, that has been previously checked by the user using checkMessage, a reply to the message is
generated here.
|
FutureResponse |
quit(PeerAddress remotePeer,
ShutdownBuilder shutdownBuilder,
ChannelCreator channelCreator)
Sends a message that indicates this peer is about to quit.
|
connectionBean, createMessage, createResponseMessage, createResponseMessage, forwardMessage, peerBean, register, register, signpublic QuitRPC(PeerBean peerBean, ConnectionBean connectionBean)
peerBean - The peer bean that contains data that is unique for each peerconnectionBean - The connection bean that is unique per connection (multiple
peers can share a single connection)public QuitRPC addPeerStatusListener(PeerStatusListener listener)
listener - The listenerpublic FutureResponse quit(PeerAddress remotePeer, ShutdownBuilder shutdownBuilder, ChannelCreator channelCreator)
remotePeer - The remote peer to send this requestshutdownBuilder - Used for the sign and force TCP flag Set if the message should
be signedchannelCreator - The channel creator that creates connectionsconfiguration - The client side connection configurationpublic void handleResponse(Message message, PeerConnection peerConnection, boolean sign, Responder responder) throws Exception
DispatchHandlerhandleResponse in class DispatchHandlermessage - Request messagesign - Flag to indicate if message is signedException - Any exceptionCopyright © 2014. All rights reserved.