public class SpdyFrameCodec extends io.netty.handler.codec.ByteToMessageDecoder implements SpdyFrameDecoderDelegate, io.netty.channel.ChannelOutboundHandler
ChannelHandler that encodes and decodes SPDY Frames.| Modifier | Constructor and Description |
|---|---|
|
SpdyFrameCodec(SpdyVersion version)
Creates a new instance with the specified
version,
validateHeaders (true), and
the default decoder and encoder options
(maxChunkSize (8192), maxHeaderSize (16384),
compressionLevel (6), windowBits (15),
and memLevel (8)). |
|
SpdyFrameCodec(SpdyVersion version,
boolean validateHeaders)
Creates a new instance with the specified
version,
validateHeaders, and
the default decoder and encoder options
(maxChunkSize (8192), maxHeaderSize (16384),
compressionLevel (6), windowBits (15),
and memLevel (8)). |
|
SpdyFrameCodec(SpdyVersion version,
int maxChunkSize,
int maxHeaderSize,
int compressionLevel,
int windowBits,
int memLevel)
Creates a new instance with the specified
version, validateHeaders (true),
decoder and encoder options. |
|
SpdyFrameCodec(SpdyVersion version,
int maxChunkSize,
int maxHeaderSize,
int compressionLevel,
int windowBits,
int memLevel,
boolean validateHeaders)
Creates a new instance with the specified
version, validateHeaders,
decoder and encoder options. |
protected |
SpdyFrameCodec(SpdyVersion version,
int maxChunkSize,
SpdyHeaderBlockDecoder spdyHeaderBlockDecoder,
SpdyHeaderBlockEncoder spdyHeaderBlockEncoder,
boolean validateHeaders) |
| Modifier and Type | Method and Description |
|---|---|
void |
bind(io.netty.channel.ChannelHandlerContext ctx,
SocketAddress localAddress,
io.netty.channel.ChannelPromise promise) |
void |
channelReadComplete(io.netty.channel.ChannelHandlerContext ctx) |
void |
close(io.netty.channel.ChannelHandlerContext ctx,
io.netty.channel.ChannelPromise promise) |
void |
connect(io.netty.channel.ChannelHandlerContext ctx,
SocketAddress remoteAddress,
SocketAddress localAddress,
io.netty.channel.ChannelPromise promise) |
protected void |
decode(io.netty.channel.ChannelHandlerContext ctx,
io.netty.buffer.ByteBuf in,
List<Object> out) |
void |
deregister(io.netty.channel.ChannelHandlerContext ctx,
io.netty.channel.ChannelPromise promise) |
void |
disconnect(io.netty.channel.ChannelHandlerContext ctx,
io.netty.channel.ChannelPromise promise) |
void |
flush(io.netty.channel.ChannelHandlerContext ctx) |
void |
handlerAdded(io.netty.channel.ChannelHandlerContext ctx) |
void |
read(io.netty.channel.ChannelHandlerContext ctx) |
void |
readDataFrame(int streamId,
boolean last,
io.netty.buffer.ByteBuf data)
Called when a DATA frame is received.
|
void |
readFrameError(String message)
Called when an unrecoverable session error has occurred.
|
void |
readGoAwayFrame(int lastGoodStreamId,
int statusCode)
Called when a GOAWAY frame is received.
|
void |
readHeaderBlock(io.netty.buffer.ByteBuf headerBlock)
Called when the header block within a SYN_STREAM, SYN_REPLY, or HEADERS frame is received.
|
void |
readHeaderBlockEnd()
Called when an entire header block has been received.
|
void |
readHeadersFrame(int streamId,
boolean last)
Called when a HEADERS frame is received.
|
void |
readPingFrame(int id)
Called when a PING frame is received.
|
void |
readRstStreamFrame(int streamId,
int statusCode)
Called when a RST_STREAM frame is received.
|
void |
readSetting(int id,
int value,
boolean persistValue,
boolean persisted)
Called when an individual setting within a SETTINGS frame is received.
|
void |
readSettingsEnd()
Called when the entire SETTINGS frame has been received.
|
void |
readSettingsFrame(boolean clearPersisted)
Called when a SETTINGS frame is received.
|
void |
readSynReplyFrame(int streamId,
boolean last)
Called when a SYN_REPLY frame is received.
|
void |
readSynStreamFrame(int streamId,
int associatedToStreamId,
byte priority,
boolean last,
boolean unidirectional)
Called when a SYN_STREAM frame is received.
|
void |
readWindowUpdateFrame(int streamId,
int deltaWindowSize)
Called when a WINDOW_UPDATE frame is received.
|
void |
write(io.netty.channel.ChannelHandlerContext ctx,
Object msg,
io.netty.channel.ChannelPromise promise) |
actualReadableBytes, callDecode, channelInactive, channelRead, decodeLast, discardSomeReadBytes, handlerRemoved, handlerRemoved0, internalBuffer, isSingleDecode, setCumulator, setDiscardAfterReads, setSingleDecode, userEventTriggeredchannelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaughtpublic SpdyFrameCodec(SpdyVersion version)
version,
validateHeaders (true), and
the default decoder and encoder options
(maxChunkSize (8192), maxHeaderSize (16384),
compressionLevel (6), windowBits (15),
and memLevel (8)).public SpdyFrameCodec(SpdyVersion version, boolean validateHeaders)
version,
validateHeaders, and
the default decoder and encoder options
(maxChunkSize (8192), maxHeaderSize (16384),
compressionLevel (6), windowBits (15),
and memLevel (8)).public SpdyFrameCodec(SpdyVersion version, int maxChunkSize, int maxHeaderSize, int compressionLevel, int windowBits, int memLevel)
version, validateHeaders (true),
decoder and encoder options.public SpdyFrameCodec(SpdyVersion version, int maxChunkSize, int maxHeaderSize, int compressionLevel, int windowBits, int memLevel, boolean validateHeaders)
version, validateHeaders,
decoder and encoder options.protected SpdyFrameCodec(SpdyVersion version, int maxChunkSize, SpdyHeaderBlockDecoder spdyHeaderBlockDecoder, SpdyHeaderBlockEncoder spdyHeaderBlockEncoder, boolean validateHeaders)
public void handlerAdded(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
handlerAdded in interface io.netty.channel.ChannelHandlerhandlerAdded in class io.netty.channel.ChannelHandlerAdapterExceptionprotected void decode(io.netty.channel.ChannelHandlerContext ctx,
io.netty.buffer.ByteBuf in,
List<Object> out)
throws Exception
decode in class io.netty.handler.codec.ByteToMessageDecoderExceptionpublic void channelReadComplete(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelReadComplete in interface io.netty.channel.ChannelInboundHandlerchannelReadComplete in class io.netty.handler.codec.ByteToMessageDecoderExceptionpublic void bind(io.netty.channel.ChannelHandlerContext ctx,
SocketAddress localAddress,
io.netty.channel.ChannelPromise promise)
throws Exception
bind in interface io.netty.channel.ChannelOutboundHandlerExceptionpublic void connect(io.netty.channel.ChannelHandlerContext ctx,
SocketAddress remoteAddress,
SocketAddress localAddress,
io.netty.channel.ChannelPromise promise)
throws Exception
connect in interface io.netty.channel.ChannelOutboundHandlerExceptionpublic void disconnect(io.netty.channel.ChannelHandlerContext ctx,
io.netty.channel.ChannelPromise promise)
throws Exception
disconnect in interface io.netty.channel.ChannelOutboundHandlerExceptionpublic void close(io.netty.channel.ChannelHandlerContext ctx,
io.netty.channel.ChannelPromise promise)
throws Exception
close in interface io.netty.channel.ChannelOutboundHandlerExceptionpublic void deregister(io.netty.channel.ChannelHandlerContext ctx,
io.netty.channel.ChannelPromise promise)
throws Exception
deregister in interface io.netty.channel.ChannelOutboundHandlerExceptionpublic void read(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
read in interface io.netty.channel.ChannelOutboundHandlerExceptionpublic void flush(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
flush in interface io.netty.channel.ChannelOutboundHandlerExceptionpublic void write(io.netty.channel.ChannelHandlerContext ctx,
Object msg,
io.netty.channel.ChannelPromise promise)
throws Exception
write in interface io.netty.channel.ChannelOutboundHandlerExceptionpublic void readDataFrame(int streamId,
boolean last,
io.netty.buffer.ByteBuf data)
SpdyFrameDecoderDelegatereadDataFrame in interface SpdyFrameDecoderDelegatepublic void readSynStreamFrame(int streamId,
int associatedToStreamId,
byte priority,
boolean last,
boolean unidirectional)
SpdyFrameDecoderDelegatereadSynStreamFrame in interface SpdyFrameDecoderDelegatepublic void readSynReplyFrame(int streamId,
boolean last)
SpdyFrameDecoderDelegatereadSynReplyFrame in interface SpdyFrameDecoderDelegatepublic void readRstStreamFrame(int streamId,
int statusCode)
SpdyFrameDecoderDelegatereadRstStreamFrame in interface SpdyFrameDecoderDelegatepublic void readSettingsFrame(boolean clearPersisted)
SpdyFrameDecoderDelegatereadSettingsFrame in interface SpdyFrameDecoderDelegatepublic void readSetting(int id,
int value,
boolean persistValue,
boolean persisted)
SpdyFrameDecoderDelegatereadSetting in interface SpdyFrameDecoderDelegatepublic void readSettingsEnd()
SpdyFrameDecoderDelegatereadSettingsEnd in interface SpdyFrameDecoderDelegatepublic void readPingFrame(int id)
SpdyFrameDecoderDelegatereadPingFrame in interface SpdyFrameDecoderDelegatepublic void readGoAwayFrame(int lastGoodStreamId,
int statusCode)
SpdyFrameDecoderDelegatereadGoAwayFrame in interface SpdyFrameDecoderDelegatepublic void readHeadersFrame(int streamId,
boolean last)
SpdyFrameDecoderDelegatereadHeadersFrame in interface SpdyFrameDecoderDelegatepublic void readWindowUpdateFrame(int streamId,
int deltaWindowSize)
SpdyFrameDecoderDelegatereadWindowUpdateFrame in interface SpdyFrameDecoderDelegatepublic void readHeaderBlock(io.netty.buffer.ByteBuf headerBlock)
SpdyFrameDecoderDelegatereadHeaderBlock in interface SpdyFrameDecoderDelegatepublic void readHeaderBlockEnd()
SpdyFrameDecoderDelegatereadHeaderBlockEnd in interface SpdyFrameDecoderDelegatepublic void readFrameError(String message)
SpdyFrameDecoderDelegatereadFrameError in interface SpdyFrameDecoderDelegateCopyright © 2008–2022 The Netty Project. All rights reserved.