Class SpdyHeaderBlockRawDecoder
- java.lang.Object
-
- org.jboss.netty.handler.codec.spdy.SpdyHeaderBlockDecoder
-
- org.jboss.netty.handler.codec.spdy.SpdyHeaderBlockRawDecoder
-
- Direct Known Subclasses:
SpdyHeaderBlockZlibDecoder
public class SpdyHeaderBlockRawDecoder extends SpdyHeaderBlockDecoder
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classSpdyHeaderBlockRawDecoder.State
-
Field Summary
Fields Modifier and Type Field Description private ChannelBuffercumulationprivate intheaderSizeprivate intlengthprivate static intLENGTH_FIELD_SIZEprivate intmaxHeaderSizeprivate java.lang.Stringnameprivate intnumHeadersprivate SpdyHeaderBlockRawDecoder.Statestate
-
Constructor Summary
Constructors Constructor Description SpdyHeaderBlockRawDecoder(SpdyVersion spdyVersion, int maxHeaderSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voiddecode(ChannelBuffer headerBlock, SpdyHeadersFrame frame)Decodes a SPDY Header Block, adding the Name/Value pairs to the given Headers frame.protected voiddecodeHeaderBlock(ChannelBuffer headerBlock, SpdyHeadersFrame frame)(package private) voidend()(package private) voidendHeaderBlock(SpdyHeadersFrame frame)private intreadLengthField(ChannelBuffer buffer)-
Methods inherited from class org.jboss.netty.handler.codec.spdy.SpdyHeaderBlockDecoder
newInstance
-
-
-
-
Field Detail
-
LENGTH_FIELD_SIZE
private static final int LENGTH_FIELD_SIZE
- See Also:
- Constant Field Values
-
maxHeaderSize
private final int maxHeaderSize
-
state
private SpdyHeaderBlockRawDecoder.State state
-
cumulation
private ChannelBuffer cumulation
-
headerSize
private int headerSize
-
numHeaders
private int numHeaders
-
length
private int length
-
name
private java.lang.String name
-
-
Constructor Detail
-
SpdyHeaderBlockRawDecoder
public SpdyHeaderBlockRawDecoder(SpdyVersion spdyVersion, int maxHeaderSize)
-
-
Method Detail
-
readLengthField
private int readLengthField(ChannelBuffer buffer)
-
decode
void decode(ChannelBuffer headerBlock, SpdyHeadersFrame frame) throws java.lang.Exception
Description copied from class:SpdyHeaderBlockDecoderDecodes a SPDY Header Block, adding the Name/Value pairs to the given Headers frame. If the header block is malformed, the Headers frame will be marked as invalid. A stream error with status code PROTOCOL_ERROR must be issued in response to an invalid frame.- Specified by:
decodein classSpdyHeaderBlockDecoder- Parameters:
headerBlock- the HeaderBlock to decodeframe- the Headers frame that receives the Name/Value pairs- Throws:
java.lang.Exception- If the header block is malformed in a way that prevents any future decoding of any other header blocks, an exception will be thrown. A session error with status code PROTOCOL_ERROR must be issued.
-
decodeHeaderBlock
protected void decodeHeaderBlock(ChannelBuffer headerBlock, SpdyHeadersFrame frame) throws java.lang.Exception
- Throws:
java.lang.Exception
-
endHeaderBlock
void endHeaderBlock(SpdyHeadersFrame frame) throws java.lang.Exception
- Specified by:
endHeaderBlockin classSpdyHeaderBlockDecoder- Throws:
java.lang.Exception
-
end
void end()
- Specified by:
endin classSpdyHeaderBlockDecoder
-
-