|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.netty.channel.SimpleChannelHandler
net.tomp2p.rpc.ReplyHandler
net.tomp2p.rpc.TaskRPC
public class TaskRPC
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler |
---|
org.jboss.netty.channel.ChannelHandler.Sharable |
Constructor Summary | |
---|---|
TaskRPC(PeerBean peerBean,
ConnectionBean connectionBean,
TaskManager taskManager)
|
Method Summary | |
---|---|
boolean |
checkMessage(Message message)
Before a reply can be done, the message needs to be checked. |
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 |
task(PeerAddress remotePeer,
ChannelCreator channelCreator,
Number160 taskID,
Map<Number160,Data> dataMap,
Mapper mapper,
KeyPair keyPair,
boolean forceUDP)
Sends a task to a remote peer. |
FutureResponse |
taskStatus(PeerAddress remotePeer,
ChannelCreator channelCreator,
Collection<Number160> taskIDs,
boolean forceTCP)
|
Methods inherited from class net.tomp2p.rpc.ReplyHandler |
---|
createMessage, exceptionCaught, forwardMessage, registerIoHandler, setSignReply |
Methods inherited from class org.jboss.netty.channel.SimpleChannelHandler |
---|
bindRequested, channelBound, channelClosed, channelConnected, channelDisconnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, closeRequested, connectRequested, disconnectRequested, handleDownstream, handleUpstream, messageReceived, setInterestOpsRequested, unbindRequested, writeComplete, writeRequested |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TaskRPC(PeerBean peerBean, ConnectionBean connectionBean, TaskManager taskManager)
Method Detail |
---|
public FutureResponse task(PeerAddress remotePeer, ChannelCreator channelCreator, Number160 taskID, Map<Number160,Data> dataMap, Mapper mapper, KeyPair keyPair, boolean forceUDP)
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 UDP
public FutureResponse taskStatus(PeerAddress remotePeer, ChannelCreator channelCreator, Collection<Number160> taskIDs, boolean forceTCP)
public boolean checkMessage(Message message)
ReplyHandler
checkMessage
in class ReplyHandler
message
- Request message
public Message handleResponse(Message message, boolean sign) throws Exception
ReplyHandler
handleResponse
in class ReplyHandler
message
- Request message
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |