org.apache.hadoop.oncrpc
Class SimpleTcpClientHandler

java.lang.Object
  extended by org.jboss.netty.channel.SimpleChannelHandler
      extended by org.apache.hadoop.oncrpc.SimpleTcpClientHandler
All Implemented Interfaces:
org.jboss.netty.channel.ChannelDownstreamHandler, org.jboss.netty.channel.ChannelHandler, org.jboss.netty.channel.ChannelUpstreamHandler

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

A simple TCP based RPC client handler used by SimpleTcpServer.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler
org.jboss.netty.channel.ChannelHandler.Sharable
 
Field Summary
static org.apache.commons.logging.Log LOG
           
protected  XDR request
           
 
Constructor Summary
SimpleTcpClientHandler(XDR request)
           
 
Method Summary
 void channelConnected(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ChannelStateEvent e)
           
 void exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ExceptionEvent e)
           
 void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.MessageEvent e)
          Shutdown connection by default.
 
Methods inherited from class org.jboss.netty.channel.SimpleChannelHandler
bindRequested, channelBound, channelClosed, 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
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG

request

protected final XDR request
Constructor Detail

SimpleTcpClientHandler

public SimpleTcpClientHandler(XDR request)
Method Detail

channelConnected

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

messageReceived

public void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx,
                            org.jboss.netty.channel.MessageEvent e)
Shutdown connection by default. Subclass can override this method to do more interaction with the server.

Overrides:
messageReceived in class org.jboss.netty.channel.SimpleChannelHandler

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


Copyright © 2009 The Apache Software Foundation