Class SpdyFrameDecoder


  • public class SpdyFrameDecoder
    extends java.lang.Object
    Decodes ByteBufs into SPDY Frames.
    • Field Detail

      • spdyVersion

        protected final int spdyVersion
      • maxChunkSize

        private final int maxChunkSize
      • frameType

        private int frameType
      • 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 specified version and the default maxChunkSize (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)
      • decodeUnknownFrame

        protected boolean decodeUnknownFrame​(int frameType,
                                             byte flags,
                                             int length,
                                             ByteBuf buffer)
        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 to decodeUnknownFrame(int, byte, int, ByteBuf).
      • isValidFrameHeader

        private static boolean isValidFrameHeader​(int streamId,
                                                  int type,
                                                  byte flags,
                                                  int length)