Package io.netty.handler.codec.spdy
Class SpdyFrameEncoder
- java.lang.Object
-
- io.netty.handler.codec.spdy.SpdyFrameEncoder
-
public class SpdyFrameEncoder extends java.lang.ObjectEncodes a SPDY Frame into aByteBuf.
-
-
Field Summary
Fields Modifier and Type Field Description private intversion
-
Constructor Summary
Constructors Constructor Description SpdyFrameEncoder(SpdyVersion spdyVersion)Creates a new instance with the specifiedspdyVersion.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static intcheckLength(int length)ByteBufencodeDataFrame(ByteBufAllocator allocator, int streamId, boolean last, ByteBuf data)ByteBufencodeGoAwayFrame(ByteBufAllocator allocator, int lastGoodStreamId, int statusCode)ByteBufencodeHeadersFrame(ByteBufAllocator allocator, int streamId, boolean last, ByteBuf headerBlock)ByteBufencodePingFrame(ByteBufAllocator allocator, int id)ByteBufencodeRstStreamFrame(ByteBufAllocator allocator, int streamId, int statusCode)ByteBufencodeSettingsFrame(ByteBufAllocator allocator, SpdySettingsFrame spdySettingsFrame)ByteBufencodeSynReplyFrame(ByteBufAllocator allocator, int streamId, boolean last, ByteBuf headerBlock)ByteBufencodeSynStreamFrame(ByteBufAllocator allocator, int streamId, int associatedToStreamId, byte priority, boolean last, boolean unidirectional, ByteBuf headerBlock)ByteBufencodeUnknownFrame(ByteBufAllocator allocator, int frameType, byte flags, ByteBuf data)ByteBufencodeWindowUpdateFrame(ByteBufAllocator allocator, int streamId, int deltaWindowSize)protected voidwriteControlFrameHeader(ByteBuf buffer, int type, byte flags, int length)
-
-
-
Constructor Detail
-
SpdyFrameEncoder
public SpdyFrameEncoder(SpdyVersion spdyVersion)
Creates a new instance with the specifiedspdyVersion.
-
-
Method Detail
-
checkLength
private static int checkLength(int length)
-
writeControlFrameHeader
protected void writeControlFrameHeader(ByteBuf buffer, int type, byte flags, int length)
-
encodeDataFrame
public ByteBuf encodeDataFrame(ByteBufAllocator allocator, int streamId, boolean last, ByteBuf data)
-
encodeSynStreamFrame
public ByteBuf encodeSynStreamFrame(ByteBufAllocator allocator, int streamId, int associatedToStreamId, byte priority, boolean last, boolean unidirectional, ByteBuf headerBlock)
-
encodeSynReplyFrame
public ByteBuf encodeSynReplyFrame(ByteBufAllocator allocator, int streamId, boolean last, ByteBuf headerBlock)
-
encodeRstStreamFrame
public ByteBuf encodeRstStreamFrame(ByteBufAllocator allocator, int streamId, int statusCode)
-
encodeSettingsFrame
public ByteBuf encodeSettingsFrame(ByteBufAllocator allocator, SpdySettingsFrame spdySettingsFrame)
-
encodePingFrame
public ByteBuf encodePingFrame(ByteBufAllocator allocator, int id)
-
encodeGoAwayFrame
public ByteBuf encodeGoAwayFrame(ByteBufAllocator allocator, int lastGoodStreamId, int statusCode)
-
encodeHeadersFrame
public ByteBuf encodeHeadersFrame(ByteBufAllocator allocator, int streamId, boolean last, ByteBuf headerBlock)
-
encodeWindowUpdateFrame
public ByteBuf encodeWindowUpdateFrame(ByteBufAllocator allocator, int streamId, int deltaWindowSize)
-
encodeUnknownFrame
public ByteBuf encodeUnknownFrame(ByteBufAllocator allocator, int frameType, byte flags, ByteBuf data)
-
-