net.gleamynode.netty.handler.codec.replay
Class ReplayingDecoder<T extends Enum<T>>

java.lang.Object
  extended by net.gleamynode.netty.channel.SimpleChannelHandler
      extended by net.gleamynode.netty.handler.codec.replay.ReplayingDecoder<T>
All Implemented Interfaces:
ChannelHandler, ChannelUpstreamHandler
Direct Known Subclasses:
CompatibleObjectDecoder

@ChannelPipelineCoverage(value="one")
public abstract class ReplayingDecoder<T extends Enum<T>>
extends SimpleChannelHandler

Version:
$Rev$, $Date$
Author:
The Netty Project (netty@googlegroups.com), Trustin Lee (trustin@gmail.com)

Constructor Summary
protected ReplayingDecoder()
           
protected ReplayingDecoder(T initialState)
           
 
Method Summary
 void channelClosed(ChannelHandlerContext ctx, ChannelStateEvent e)
           
 void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e)
           
protected  void checkpoint()
           
protected  void checkpoint(T state)
           
protected abstract  Object decode(ChannelHandlerContext ctx, Channel channel, ChannelBuffer buffer, T state)
           
protected  Object decodeLast(ChannelHandlerContext ctx, Channel channel, ChannelBuffer buffer, T state)
           
 void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e)
           
 void messageReceived(ChannelHandlerContext ctx, MessageEvent e)
           
 
Methods inherited from class net.gleamynode.netty.channel.SimpleChannelHandler
channelBound, channelConnected, 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

ReplayingDecoder

protected ReplayingDecoder()

ReplayingDecoder

protected ReplayingDecoder(T initialState)
Method Detail

messageReceived

public void messageReceived(ChannelHandlerContext ctx,
                            MessageEvent e)
                     throws Exception
Overrides:
messageReceived in class SimpleChannelHandler
Throws:
Exception

channelDisconnected

public void channelDisconnected(ChannelHandlerContext ctx,
                                ChannelStateEvent e)
                         throws Exception
Overrides:
channelDisconnected in class SimpleChannelHandler
Throws:
Exception

channelClosed

public void channelClosed(ChannelHandlerContext ctx,
                          ChannelStateEvent e)
                   throws Exception
Overrides:
channelClosed in class SimpleChannelHandler
Throws:
Exception

exceptionCaught

public void exceptionCaught(ChannelHandlerContext ctx,
                            ExceptionEvent e)
                     throws Exception
Overrides:
exceptionCaught in class SimpleChannelHandler
Throws:
Exception

checkpoint

protected void checkpoint()

checkpoint

protected void checkpoint(T state)

decode

protected abstract Object decode(ChannelHandlerContext ctx,
                                 Channel channel,
                                 ChannelBuffer buffer,
                                 T state)
                          throws Exception
Throws:
Exception

decodeLast

protected Object decodeLast(ChannelHandlerContext ctx,
                            Channel channel,
                            ChannelBuffer buffer,
                            T state)
                     throws Exception
Throws:
Exception


Copyright © 2008-Present Trustin Heuiseung Lee. All Rights Reserved.