org.sdnplatform.sync.internal.rpc
Class ThriftFrameDecoder
java.lang.Object
org.jboss.netty.channel.SimpleChannelUpstreamHandler
org.jboss.netty.handler.codec.frame.FrameDecoder
org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder
org.sdnplatform.sync.internal.rpc.ThriftFrameDecoder
- All Implemented Interfaces:
- org.jboss.netty.channel.ChannelHandler, org.jboss.netty.channel.ChannelUpstreamHandler
public class ThriftFrameDecoder
- extends org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder
Decode a SyncMessage
from the channel
- Author:
- readams
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler |
org.jboss.netty.channel.ChannelHandler.Sharable |
Method Summary |
protected java.lang.Object |
decode(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.Channel channel,
org.jboss.netty.buffer.ChannelBuffer buffer)
|
protected org.jboss.netty.buffer.ChannelBuffer |
extractFrame(org.jboss.netty.buffer.ChannelBuffer buffer,
int index,
int length)
|
Methods inherited from class org.jboss.netty.handler.codec.frame.FrameDecoder |
channelClosed, channelDisconnected, decodeLast, exceptionCaught, messageReceived |
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 |
ThriftFrameDecoder
public ThriftFrameDecoder(int maxSize)
decode
protected java.lang.Object decode(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.Channel channel,
org.jboss.netty.buffer.ChannelBuffer buffer)
throws java.lang.Exception
- Overrides:
decode
in class org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder
- Throws:
java.lang.Exception
extractFrame
protected org.jboss.netty.buffer.ChannelBuffer extractFrame(org.jboss.netty.buffer.ChannelBuffer buffer,
int index,
int length)
- Overrides:
extractFrame
in class org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder