Class SpdyFrameDecoder
java.lang.Object
io.netty.handler.codec.spdy.SpdyFrameDecoder
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final intprotected final SpdyFrameDecoderDelegateprivate byteprivate intprivate intprivate final intprivate final intprivate intprotected final intprivate SpdyFrameDecoder.Stateprivate int -
Constructor Summary
ConstructorsConstructorDescriptionSpdyFrameDecoder(SpdyVersion spdyVersion, SpdyFrameDecoderDelegate delegate) Creates a new instance with the specifiedversionand the defaultmaxChunkSize (8192).SpdyFrameDecoder(SpdyVersion spdyVersion, SpdyFrameDecoderDelegate delegate, int maxChunkSize) Creates a new instance with the specified parameters.SpdyFrameDecoder(SpdyVersion spdyVersion, SpdyFrameDecoderDelegate delegate, int maxChunkSize, int maxNumSettings) Creates a new instance with the specified parameters. -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected booleandecodeUnknownFrame(int frameType, byte flags, int length, ByteBuf buffer) Decode the unknown frame, returns true if parsed something, otherwise false.private static SpdyFrameDecoder.StategetNextState(int type, int length) private static booleanhasFlag(byte flags, byte flag) private static booleanisValidFrameHeader(int streamId, int type, byte flags, int length) protected booleanisValidUnknownFrameHeader(int streamId, int type, byte flags, int length) Check whether the unknown frame is valid, if not, the frame will be discarded, otherwise, the frame will be passed todecodeUnknownFrame(int, byte, int, ByteBuf).
-
Field Details
-
delegate
-
spdyVersion
protected final int spdyVersion -
DEFAULT_MAX_NUM_SETTINGS
static final int DEFAULT_MAX_NUM_SETTINGS- See Also:
-
maxChunkSize
private final int maxChunkSize -
maxNumSettings
private final int maxNumSettings -
frameType
private int frameType -
state
-
flags
private byte flags -
length
private int length -
streamId
private int streamId -
numSettings
private int numSettings
-
-
Constructor Details
-
SpdyFrameDecoder
Creates a new instance with the specifiedversionand the defaultmaxChunkSize (8192). -
SpdyFrameDecoder
public SpdyFrameDecoder(SpdyVersion spdyVersion, SpdyFrameDecoderDelegate delegate, int maxChunkSize) Creates a new instance with the specified parameters. -
SpdyFrameDecoder
public SpdyFrameDecoder(SpdyVersion spdyVersion, SpdyFrameDecoderDelegate delegate, int maxChunkSize, int maxNumSettings) Creates a new instance with the specified parameters.
-
-
Method Details
-
decode
-
hasFlag
private static boolean hasFlag(byte flags, byte flag) -
getNextState
-
decodeUnknownFrame
Decode the unknown frame, returns true if parsed something, otherwise false. -
isValidUnknownFrameHeader
protected boolean isValidUnknownFrameHeader(int streamId, int type, byte flags, int length) Check whether the unknown frame is valid, if not, the frame will be discarded, otherwise, the frame will be passed todecodeUnknownFrame(int, byte, int, ByteBuf). -
isValidFrameHeader
private static boolean isValidFrameHeader(int streamId, int type, byte flags, int length)
-