org.infinispan.server.core.transport.netty
Class NettyDecoder<T extends Enum<T>>

java.lang.Object
  extended by org.jboss.netty.channel.SimpleChannelUpstreamHandler
      extended by org.jboss.netty.handler.codec.replay.ReplayingDecoder<T>
          extended by org.infinispan.server.core.transport.netty.NettyDecoder<T>
All Implemented Interfaces:
Decoder.Checkpointer<T>, org.jboss.netty.channel.ChannelHandler, org.jboss.netty.channel.ChannelUpstreamHandler

public class NettyDecoder<T extends Enum<T>>
extends org.jboss.netty.handler.codec.replay.ReplayingDecoder<T>
implements Decoder.Checkpointer<T>

// TODO: Document this

Since:
4.0
Author:
Galder ZamarreƱo

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler
org.jboss.netty.channel.ChannelHandler.Sharable
 
Constructor Summary
NettyDecoder(Decoder<T> decoder)
           
NettyDecoder(Decoder<T> decoder, T initialState)
           
 
Method Summary
 void checkpoint(T state)
           
protected  Object decode(org.jboss.netty.channel.ChannelHandlerContext nCtx, org.jboss.netty.channel.Channel channel, org.jboss.netty.buffer.ChannelBuffer nBuffer, T state)
           
 void exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ExceptionEvent e)
           
 
Methods inherited from class org.jboss.netty.handler.codec.replay.ReplayingDecoder
actualReadableBytes, channelClosed, channelDisconnected, checkpoint, decodeLast, getState, messageReceived, setState
 
Methods inherited from class org.jboss.netty.channel.SimpleChannelUpstreamHandler
channelBound, channelConnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, handleUpstream, writeComplete
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NettyDecoder

public NettyDecoder(Decoder<T> decoder)

NettyDecoder

public NettyDecoder(Decoder<T> decoder,
                    T initialState)
Method Detail

decode

protected Object decode(org.jboss.netty.channel.ChannelHandlerContext nCtx,
                        org.jboss.netty.channel.Channel channel,
                        org.jboss.netty.buffer.ChannelBuffer nBuffer,
                        T state)
                 throws Exception
Specified by:
decode in class org.jboss.netty.handler.codec.replay.ReplayingDecoder<T extends Enum<T>>
Throws:
Exception

checkpoint

public void checkpoint(T state)
Specified by:
checkpoint in interface Decoder.Checkpointer<T extends Enum<T>>
Overrides:
checkpoint in class org.jboss.netty.handler.codec.replay.ReplayingDecoder<T extends Enum<T>>

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.handler.codec.replay.ReplayingDecoder<T extends Enum<T>>
Throws:
Exception

Google Analytics

Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.