public class DirectDataRPC extends ReplyHandler
Constructor and Description |
---|
DirectDataRPC(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.
|
boolean |
hasObjectDataReply() |
boolean |
hasRawDataReply() |
RequestHandlerTCP<FutureResponse> |
prepareSend(PeerAddress remotePeer,
org.jboss.netty.buffer.ChannelBuffer buffer,
boolean raw)
Prepares for sending to a remote peer.
|
FutureResponse |
send(PeerAddress remotePeer,
org.jboss.netty.buffer.ChannelBuffer buffer,
boolean raw,
ChannelCreator channelCreator,
boolean forceUDP) |
FutureResponse |
send(PeerAddress remotePeer,
org.jboss.netty.buffer.ChannelBuffer buffer,
boolean raw,
ChannelCreator channelCreator,
int idleTCPMillis,
boolean forceUDP)
Send data directly to a peer.
|
void |
setReply(ObjectDataReply objectDataReply) |
void |
setReply(RawDataReply rawDataReply) |
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 DirectDataRPC(PeerBean peerBean, ConnectionBean connectionBean)
public FutureResponse send(PeerAddress remotePeer, org.jboss.netty.buffer.ChannelBuffer buffer, boolean raw, ChannelCreator channelCreator, boolean forceUDP)
public FutureResponse send(PeerAddress remotePeer, org.jboss.netty.buffer.ChannelBuffer buffer, boolean raw, ChannelCreator channelCreator, int idleTCPMillis, boolean forceUDP)
remotePeer
- The remote peer to store the databuffer
- The data to send to the remote peerraw
- Set to true if a the byte array is expected or if it should be
converted to an objectchannelCreator
- The channel creatoridleTCPMillis
- Set the timeout when a connection is considered inactive
(idle)forceUDP
- Set to true if the communication should be UDP, default is TCPpublic RequestHandlerTCP<FutureResponse> prepareSend(PeerAddress remotePeer, org.jboss.netty.buffer.ChannelBuffer buffer, boolean raw)
remotePeer
- The remote peer to store the databuffer
- The data to send to the remote peerraw
- Set to true if a the byte array is expected or if it should be
converted to an objectpublic void setReply(RawDataReply rawDataReply)
public void setReply(ObjectDataReply objectDataReply)
public boolean hasRawDataReply()
public boolean hasObjectDataReply()
public Message handleResponse(Message message, boolean sign) throws Exception
ReplyHandler
handleResponse
in class ReplyHandler
message
- Request messageException
Copyright © 2013. All Rights Reserved.