Package io.netty.handler.codec.spdy
Class SpdyFrameDecoder
- java.lang.Object
-
- io.netty.handler.codec.spdy.SpdyFrameDecoder
-
public class SpdyFrameDecoder extends java.lang.ObjectDecodesByteBufs into SPDY Frames.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classSpdyFrameDecoder.State
-
Field Summary
Fields Modifier and Type Field Description private SpdyFrameDecoderDelegatedelegateprivate byteflagsprivate intlengthprivate intmaxChunkSizeprivate intnumSettingsprivate intspdyVersionprivate SpdyFrameDecoder.Statestateprivate intstreamId
-
Constructor Summary
Constructors Constructor Description SpdyFrameDecoder(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.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecode(ByteBuf buffer)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)
-
-
-
Field Detail
-
spdyVersion
private final int spdyVersion
-
maxChunkSize
private final int maxChunkSize
-
delegate
private final SpdyFrameDecoderDelegate delegate
-
state
private SpdyFrameDecoder.State state
-
flags
private byte flags
-
length
private int length
-
streamId
private int streamId
-
numSettings
private int numSettings
-
-
Constructor Detail
-
SpdyFrameDecoder
public SpdyFrameDecoder(SpdyVersion spdyVersion, SpdyFrameDecoderDelegate delegate)
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.
-
-
Method Detail
-
decode
public void decode(ByteBuf buffer)
-
hasFlag
private static boolean hasFlag(byte flags, byte flag)
-
getNextState
private static SpdyFrameDecoder.State getNextState(int type, int length)
-
isValidFrameHeader
private static boolean isValidFrameHeader(int streamId, int type, byte flags, int length)
-
-