|
||||||||||
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.DirectDataRPC
public class DirectDataRPC
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler |
---|
org.jboss.netty.channel.ChannelHandler.Sharable |
Constructor Summary | |
---|---|
DirectDataRPC(PeerBean peerBean,
ConnectionBean connectionBean)
|
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. |
boolean |
hasObjectDataReply()
|
boolean |
hasRawDataReply()
|
RequestHandlerTCP<FutureData> |
prepareSend(PeerAddress remotePeer,
org.jboss.netty.buffer.ChannelBuffer buffer,
boolean raw)
Prepares for sending to a remote peer. |
FutureData |
send(PeerAddress remotePeer,
org.jboss.netty.buffer.ChannelBuffer buffer,
boolean raw,
ChannelCreator channelCreator)
Deprecated. |
FutureData |
send(PeerAddress remotePeer,
org.jboss.netty.buffer.ChannelBuffer buffer,
boolean raw,
ChannelCreator channelCreator,
boolean forceUDP)
|
FutureData |
send(PeerAddress remotePeer,
org.jboss.netty.buffer.ChannelBuffer buffer,
boolean raw,
ChannelCreator channelCreator,
int idleTCPMillis)
Deprecated. |
FutureData |
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)
|
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 DirectDataRPC(PeerBean peerBean, ConnectionBean connectionBean)
Method Detail |
---|
@Deprecated public FutureData send(PeerAddress remotePeer, org.jboss.netty.buffer.ChannelBuffer buffer, boolean raw, ChannelCreator channelCreator)
public FutureData send(PeerAddress remotePeer, org.jboss.netty.buffer.ChannelBuffer buffer, boolean raw, ChannelCreator channelCreator, boolean forceUDP)
@Deprecated public FutureData send(PeerAddress remotePeer, org.jboss.netty.buffer.ChannelBuffer buffer, boolean raw, ChannelCreator channelCreator, int idleTCPMillis)
public FutureData 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 TCP
public RequestHandlerTCP<FutureData> 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 object
public void setReply(RawDataReply rawDataReply)
public void setReply(ObjectDataReply objectDataReply)
public boolean checkMessage(Message message)
ReplyHandler
checkMessage
in class ReplyHandler
message
- Request message
public boolean hasRawDataReply()
public boolean hasObjectDataReply()
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 |