net.tomp2p.rpc
Class RequestHandlerUDP

java.lang.Object
  extended by org.jboss.netty.channel.SimpleChannelHandler
      extended by net.tomp2p.rpc.RequestHandlerUDP
All Implemented Interfaces:
org.jboss.netty.channel.ChannelDownstreamHandler, org.jboss.netty.channel.ChannelHandler, org.jboss.netty.channel.ChannelUpstreamHandler

public class RequestHandlerUDP
extends org.jboss.netty.channel.SimpleChannelHandler

Is able to send messages (as a request) and processes incoming replies.

Author:
Thomas Bocek

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler
org.jboss.netty.channel.ChannelHandler.Sharable
 
Constructor Summary
RequestHandlerUDP(FutureResponse futureResponse, PeerBean peerBean, ConnectionBean connectionBean, Message message)
           
RequestHandlerUDP(PeerBean peerBean, ConnectionBean connectionBean, Message message)
           
 
Method Summary
 void exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ExceptionEvent e)
           
 FutureResponse fireAndForgetUDP()
           
 FutureResponse getFutureResponse()
           
protected  PeerMap getPeerMap()
           
 void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.MessageEvent e)
           
 FutureResponse sendBroadcastUDP()
           
 FutureResponse sendUDP()
           
 
Methods inherited from class org.jboss.netty.channel.SimpleChannelHandler
bindRequested, channelBound, channelClosed, channelConnected, channelDisconnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, closeRequested, connectRequested, disconnectRequested, handleDownstream, handleUpstream, setInterestOpsRequested, unbindRequested, writeComplete, writeRequested
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestHandlerUDP

public RequestHandlerUDP(PeerBean peerBean,
                         ConnectionBean connectionBean,
                         Message message)

RequestHandlerUDP

public RequestHandlerUDP(FutureResponse futureResponse,
                         PeerBean peerBean,
                         ConnectionBean connectionBean,
                         Message message)
Parameters:
objectHolder - the bean representing the node this handler belongs to
Method Detail

getFutureResponse

public FutureResponse getFutureResponse()

sendUDP

public FutureResponse sendUDP()

sendBroadcastUDP

public FutureResponse sendBroadcastUDP()

fireAndForgetUDP

public FutureResponse fireAndForgetUDP()

getPeerMap

protected PeerMap getPeerMap()

exceptionCaught

public void exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx,
                            org.jboss.netty.channel.ExceptionEvent e)
Overrides:
exceptionCaught in class org.jboss.netty.channel.SimpleChannelHandler

messageReceived

public void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx,
                            org.jboss.netty.channel.MessageEvent e)
                     throws Exception
Overrides:
messageReceived in class org.jboss.netty.channel.SimpleChannelHandler
Throws:
Exception


Copyright © 2011. All Rights Reserved.