public class SpdyFrameDecoder extends FrameDecoder
ChannelBuffer
s into SPDY Frames.ChannelHandler.Sharable
cumulation, DEFAULT_MAX_COMPOSITEBUFFER_COMPONENTS
Modifier | Constructor and Description |
---|---|
|
SpdyFrameDecoder(SpdyVersion spdyVersion)
Creates a new instance with the specified
version and the default
maxChunkSize (8192) and maxHeaderSize (16384) . |
|
SpdyFrameDecoder(SpdyVersion spdyVersion,
int maxChunkSize,
int maxHeaderSize)
Creates a new instance with the specified parameters.
|
protected |
SpdyFrameDecoder(SpdyVersion spdyVersion,
int maxChunkSize,
org.jboss.netty.handler.codec.spdy.SpdyHeaderBlockDecoder headerBlockDecoder) |
Modifier and Type | Method and Description |
---|---|
protected void |
cleanup(ChannelHandlerContext ctx,
ChannelStateEvent e)
|
protected Object |
decode(ChannelHandlerContext ctx,
Channel channel,
ChannelBuffer buffer)
Decodes the received packets so far into a frame.
|
actualReadableBytes, afterAdd, afterRemove, appendToCumulation, beforeAdd, beforeRemove, channelClosed, channelDisconnected, decodeLast, exceptionCaught, extractFrame, getMaxCumulationBufferCapacity, getMaxCumulationBufferComponents, internalBuffer, isUnfold, messageReceived, newCumulationBuffer, replace, setMaxCumulationBufferCapacity, setMaxCumulationBufferComponents, setUnfold, unfoldAndFireMessageReceived, updateCumulation
channelBound, channelConnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, handleUpstream, writeComplete
public SpdyFrameDecoder(SpdyVersion spdyVersion)
version
and the default
maxChunkSize (8192)
and maxHeaderSize (16384)
.public SpdyFrameDecoder(SpdyVersion spdyVersion, int maxChunkSize, int maxHeaderSize)
protected SpdyFrameDecoder(SpdyVersion spdyVersion, int maxChunkSize, org.jboss.netty.handler.codec.spdy.SpdyHeaderBlockDecoder headerBlockDecoder)
protected Object decode(ChannelHandlerContext ctx, Channel channel, ChannelBuffer buffer) throws Exception
FrameDecoder
FrameDecoder.extractFrame(ChannelBuffer, int, int)
method,
to make optimizations easier later.decode
in class FrameDecoder
ctx
- the context of this handlerchannel
- the current channelbuffer
- the cumulative buffer of received packets so far.
Note that the buffer might be empty, which means you
should not make an assumption that the buffer contains
at least one byte in your decoder implementation.null
if there's not enough data in the buffer to decode a frame.Exception
protected void cleanup(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception
FrameDecoder
FrameDecoder.channelDisconnected(ChannelHandlerContext, ChannelStateEvent)
and
FrameDecoder.channelClosed(ChannelHandlerContext, ChannelStateEvent)
cleanup
in class FrameDecoder
Exception
Copyright © 2008-2014 The Netty Project. All Rights Reserved.