openr66.protocol.networkhandler.packet
Class NetworkPacketCodec

java.lang.Object
  extended by org.jboss.netty.channel.SimpleChannelUpstreamHandler
      extended by org.jboss.netty.handler.codec.frame.FrameDecoder
          extended by openr66.protocol.networkhandler.packet.NetworkPacketCodec
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 NetworkPacketCodec
extends org.jboss.netty.handler.codec.frame.FrameDecoder
implements org.jboss.netty.channel.ChannelDownstreamHandler

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
NetworkPacketCodec()
           
 
Method Summary
protected  Object decode(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.Channel channel, 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

NetworkPacketCodec

public NetworkPacketCodec()
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

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.