public class SpdyFrameDecoder extends FrameDecoder
ChannelBuffer
s into SPDY Frames.ChannelHandler.Sharable
cumulation, DEFAULT_MAX_COMPOSITEBUFFER_COMPONENTS
Modifier | Constructor and Description |
---|---|
|
SpdyFrameDecoder(int version)
Creates a new instance with the specified
version and the default
maxChunkSize (8192) and maxHeaderSize (16384) . |
|
SpdyFrameDecoder(int version,
int maxChunkSize,
int maxHeaderSize)
Creates a new instance with the specified parameters.
|
protected |
SpdyFrameDecoder(int version,
int maxChunkSize,
org.jboss.netty.handler.codec.spdy.SpdyHeaderBlockDecoder headerBlockDecoder) |
Modifier and Type | Method and Description |
---|---|
protected Object |
decode(ChannelHandlerContext ctx,
Channel channel,
ChannelBuffer buffer)
Decodes the received packets so far into a frame.
|
protected Object |
decodeLast(ChannelHandlerContext ctx,
Channel channel,
ChannelBuffer buffer)
Decodes the received data so far into a frame when the channel is
disconnected.
|
actualReadableBytes, afterAdd, afterRemove, appendToCumulation, beforeAdd, beforeRemove, channelClosed, channelDisconnected, cleanup, 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(int version)
version
and the default
maxChunkSize (8192)
and maxHeaderSize (16384)
.public SpdyFrameDecoder(int version, int maxChunkSize, int maxHeaderSize)
protected SpdyFrameDecoder(int version, int maxChunkSize, org.jboss.netty.handler.codec.spdy.SpdyHeaderBlockDecoder headerBlockDecoder)
protected Object decodeLast(ChannelHandlerContext ctx, Channel channel, ChannelBuffer buffer) throws Exception
FrameDecoder
decodeLast
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 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
Copyright © 2008-2014 The Netty Project. All Rights Reserved.