org.elasticsearch.transport.netty
Class MessageChannelHandler

java.lang.Object
  extended by org.jboss.netty.channel.SimpleChannelUpstreamHandler
      extended by org.elasticsearch.transport.netty.MessageChannelHandler
All Implemented Interfaces:
org.jboss.netty.channel.ChannelHandler, org.jboss.netty.channel.ChannelUpstreamHandler

public class MessageChannelHandler
extends org.jboss.netty.channel.SimpleChannelUpstreamHandler

A handler (must be the last one!) that does size based frame decoding and forwards the actual message to the relevant action.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler
org.jboss.netty.channel.ChannelHandler.Sharable
 
Constructor Summary
MessageChannelHandler(NettyTransport transport, ESLogger logger)
           
 
Method Summary
 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)
           
 void writeComplete(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.WriteCompletionEvent e)
           
 
Methods inherited from class org.jboss.netty.channel.SimpleChannelUpstreamHandler
channelBound, channelClosed, channelConnected, channelDisconnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, handleUpstream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageChannelHandler

public MessageChannelHandler(NettyTransport transport,
                             ESLogger logger)
Method Detail

writeComplete

public void writeComplete(org.jboss.netty.channel.ChannelHandlerContext ctx,
                          org.jboss.netty.channel.WriteCompletionEvent e)
                   throws Exception
Overrides:
writeComplete in class org.jboss.netty.channel.SimpleChannelUpstreamHandler
Throws:
Exception

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.SimpleChannelUpstreamHandler
Throws:
Exception

exceptionCaught

public void exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx,
                            org.jboss.netty.channel.ExceptionEvent e)
                     throws Exception
Overrides:
exceptionCaught in class org.jboss.netty.channel.SimpleChannelUpstreamHandler
Throws:
Exception


Copyright © 2009-2012. All Rights Reserved.