openr66.protocol.localhandler.packet
Class LocalPacketCodec

java.lang.Object
  extended by org.jboss.netty.channel.SimpleChannelUpstreamHandler
      extended by org.jboss.netty.handler.codec.frame.FrameDecoder
          extended by openr66.protocol.localhandler.packet.LocalPacketCodec
All Implemented Interfaces:
org.jboss.netty.channel.ChannelDownstreamHandler, org.jboss.netty.channel.ChannelHandler, org.jboss.netty.channel.ChannelUpstreamHandler, org.jboss.netty.channel.LifeCycleAwareChannelHandler

public class LocalPacketCodec
extends org.jboss.netty.handler.codec.frame.FrameDecoder
implements org.jboss.netty.channel.ChannelDownstreamHandler

Local Packet Decoder

Author:
Frederic Bregier

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler
org.jboss.netty.channel.ChannelHandler.Sharable
 
Field Summary
 
Fields inherited from class org.jboss.netty.handler.codec.frame.FrameDecoder
cumulation
 
Constructor Summary
LocalPacketCodec()
           
 
Method Summary
protected  Object decode(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.Channel channel, org.jboss.netty.buffer.ChannelBuffer buf)
           
static AbstractLocalPacket decodeNetworkPacket(org.jboss.netty.buffer.ChannelBuffer buf)
           
 void handleDownstream(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ChannelEvent e)
           
 
Methods inherited from class org.jboss.netty.handler.codec.frame.FrameDecoder
actualReadableBytes, afterAdd, afterRemove, appendToCumulation, beforeAdd, beforeRemove, channelClosed, channelDisconnected, cleanup, decodeLast, exceptionCaught, getMaxCumulationBufferCapacity, internalBuffer, isUnfold, messageReceived, newCumulationBuffer, replace, setMaxCumulationBufferCapacity, setUnfold, unfoldAndFireMessageReceived, updateCumulation
 
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

LocalPacketCodec

public LocalPacketCodec()
Method Detail

decode

protected Object decode(org.jboss.netty.channel.ChannelHandlerContext ctx,
                        org.jboss.netty.channel.Channel channel,
                        org.jboss.netty.buffer.ChannelBuffer buf)
                 throws Exception
Specified by:
decode in class org.jboss.netty.handler.codec.frame.FrameDecoder
Throws:
Exception

decodeNetworkPacket

public static AbstractLocalPacket decodeNetworkPacket(org.jboss.netty.buffer.ChannelBuffer buf)
                                               throws OpenR66ProtocolPacketException
Throws:
OpenR66ProtocolPacketException

handleDownstream

public void handleDownstream(org.jboss.netty.channel.ChannelHandlerContext ctx,
                             org.jboss.netty.channel.ChannelEvent e)
                      throws Exception
Specified by:
handleDownstream in interface org.jboss.netty.channel.ChannelDownstreamHandler
Throws:
Exception


Copyright © 2009-2012 Frederic Bregier. All Rights Reserved.