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, userEventTriggered
channelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught
public 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.ChannelHandler
handlerAdded
in class io.netty.channel.ChannelHandlerAdapter
Exception
protected void decode(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf in, List<Object> out) throws Exception
decode
in class io.netty.handler.codec.ByteToMessageDecoder
Exception
public void channelReadComplete(io.netty.channel.ChannelHandlerContext ctx) throws Exception
channelReadComplete
in interface io.netty.channel.ChannelInboundHandler
channelReadComplete
in class io.netty.handler.codec.ByteToMessageDecoder
Exception
public void bind(io.netty.channel.ChannelHandlerContext ctx, SocketAddress localAddress, io.netty.channel.ChannelPromise promise) throws Exception
bind
in interface io.netty.channel.ChannelOutboundHandler
Exception
public void connect(io.netty.channel.ChannelHandlerContext ctx, SocketAddress remoteAddress, SocketAddress localAddress, io.netty.channel.ChannelPromise promise) throws Exception
connect
in interface io.netty.channel.ChannelOutboundHandler
Exception
public void disconnect(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.ChannelPromise promise) throws Exception
disconnect
in interface io.netty.channel.ChannelOutboundHandler
Exception
public void close(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.ChannelPromise promise) throws Exception
close
in interface io.netty.channel.ChannelOutboundHandler
Exception
public void deregister(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.ChannelPromise promise) throws Exception
deregister
in interface io.netty.channel.ChannelOutboundHandler
Exception
public void read(io.netty.channel.ChannelHandlerContext ctx) throws Exception
read
in interface io.netty.channel.ChannelOutboundHandler
Exception
public void flush(io.netty.channel.ChannelHandlerContext ctx) throws Exception
flush
in interface io.netty.channel.ChannelOutboundHandler
Exception
public void write(io.netty.channel.ChannelHandlerContext ctx, Object msg, io.netty.channel.ChannelPromise promise) throws Exception
write
in interface io.netty.channel.ChannelOutboundHandler
Exception
public void readDataFrame(int streamId, boolean last, io.netty.buffer.ByteBuf data)
SpdyFrameDecoderDelegate
readDataFrame
in interface SpdyFrameDecoderDelegate
public void readSynStreamFrame(int streamId, int associatedToStreamId, byte priority, boolean last, boolean unidirectional)
SpdyFrameDecoderDelegate
readSynStreamFrame
in interface SpdyFrameDecoderDelegate
public void readSynReplyFrame(int streamId, boolean last)
SpdyFrameDecoderDelegate
readSynReplyFrame
in interface SpdyFrameDecoderDelegate
public void readRstStreamFrame(int streamId, int statusCode)
SpdyFrameDecoderDelegate
readRstStreamFrame
in interface SpdyFrameDecoderDelegate
public void readSettingsFrame(boolean clearPersisted)
SpdyFrameDecoderDelegate
readSettingsFrame
in interface SpdyFrameDecoderDelegate
public void readSetting(int id, int value, boolean persistValue, boolean persisted)
SpdyFrameDecoderDelegate
readSetting
in interface SpdyFrameDecoderDelegate
public void readSettingsEnd()
SpdyFrameDecoderDelegate
readSettingsEnd
in interface SpdyFrameDecoderDelegate
public void readPingFrame(int id)
SpdyFrameDecoderDelegate
readPingFrame
in interface SpdyFrameDecoderDelegate
public void readGoAwayFrame(int lastGoodStreamId, int statusCode)
SpdyFrameDecoderDelegate
readGoAwayFrame
in interface SpdyFrameDecoderDelegate
public void readHeadersFrame(int streamId, boolean last)
SpdyFrameDecoderDelegate
readHeadersFrame
in interface SpdyFrameDecoderDelegate
public void readWindowUpdateFrame(int streamId, int deltaWindowSize)
SpdyFrameDecoderDelegate
readWindowUpdateFrame
in interface SpdyFrameDecoderDelegate
public void readHeaderBlock(io.netty.buffer.ByteBuf headerBlock)
SpdyFrameDecoderDelegate
readHeaderBlock
in interface SpdyFrameDecoderDelegate
public void readHeaderBlockEnd()
SpdyFrameDecoderDelegate
readHeaderBlockEnd
in interface SpdyFrameDecoderDelegate
public void readFrameError(String message)
SpdyFrameDecoderDelegate
readFrameError
in interface SpdyFrameDecoderDelegate
Copyright © 2008–2023 The Netty Project. All rights reserved.