public class TaskRPC extends ReplyHandler
Constructor and Description |
---|
TaskRPC(PeerBean peerBean,
ConnectionBean connectionBean) |
Modifier and Type | Method and Description |
---|---|
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.
|
FutureResponse |
sendResult(PeerAddress remotePeer,
ChannelCreator channelCreator,
Number160 taskID,
Map<Number160,Data> dataMap,
KeyPair keyPair,
boolean forceUDP,
boolean sign) |
FutureResponse |
sendTask(PeerAddress remotePeer,
ChannelCreator channelCreator,
Number160 taskID,
Map<Number160,Data> dataMap,
Worker mapper,
KeyPair keyPair,
boolean forceUDP,
boolean sign)
Sends a task to a remote peer.
|
FutureResponse |
taskStatus(PeerAddress remotePeer,
ChannelCreator channelCreator,
Collection<Number160> taskIDs,
boolean forceTCP) |
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 TaskRPC(PeerBean peerBean, ConnectionBean connectionBean)
public FutureResponse sendTask(PeerAddress remotePeer, ChannelCreator channelCreator, Number160 taskID, Map<Number160,Data> dataMap, Worker mapper, KeyPair keyPair, boolean forceUDP, boolean sign)
remotePeer
- The remote peer to send this requestchannelCreator
- The channel creator that creates connectionsforceTCP
- Set to true if the communication should be TCP, default is UDPpublic FutureResponse sendResult(PeerAddress remotePeer, ChannelCreator channelCreator, Number160 taskID, Map<Number160,Data> dataMap, KeyPair keyPair, boolean forceUDP, boolean sign)
public FutureResponse taskStatus(PeerAddress remotePeer, ChannelCreator channelCreator, Collection<Number160> taskIDs, boolean forceTCP)
public Message handleResponse(Message message, boolean sign) throws Exception
ReplyHandler
handleResponse
in class ReplyHandler
message
- Request messageException
Copyright © 2013. All Rights Reserved.