Class SpdyHttpDecoder

    • Field Detail

      • spdyVersion

        private final int spdyVersion
      • maxContentLength

        private final int maxContentLength
      • messageMap

        private final java.util.Map<java.lang.Integer,​HttpMessage> messageMap
    • Constructor Detail

      • SpdyHttpDecoder

        public SpdyHttpDecoder​(SpdyVersion spdyVersion,
                               int maxContentLength)
        Creates a new instance.
        Parameters:
        spdyVersion - the protocol version
        maxContentLength - the maximum length of the message content. If the length of the message content exceeds this value, a TooLongFrameException will be raised.
      • SpdyHttpDecoder

        protected SpdyHttpDecoder​(SpdyVersion spdyVersion,
                                  int maxContentLength,
                                  java.util.Map<java.lang.Integer,​HttpMessage> messageMap)
        Creates a new instance with the specified parameters.
        Parameters:
        spdyVersion - the protocol version
        maxContentLength - the maximum length of the message content. If the length of the message content exceeds this value, a TooLongFrameException will be raised.
        messageMap - the Map used to hold partially received messages.
    • Method Detail

      • getMessage

        protected HttpMessage getMessage​(int streamId)
      • removeMessage

        protected HttpMessage removeMessage​(int streamId)
      • decode

        protected java.lang.Object decode​(ChannelHandlerContext ctx,
                                          Channel channel,
                                          java.lang.Object msg)
                                   throws java.lang.Exception
        Description copied from class: OneToOneDecoder
        Transforms the specified received message into another message and return the transformed message. Return null if the received message is supposed to be discarded.
        Specified by:
        decode in class OneToOneDecoder
        Throws:
        java.lang.Exception
      • createHttpRequest

        private static HttpRequest createHttpRequest​(int spdyVersion,
                                                     SpdyHeadersFrame requestFrame)
                                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • createHttpResponse

        private static HttpResponse createHttpResponse​(int spdyVersion,
                                                       SpdyHeadersFrame responseFrame)
                                                throws java.lang.Exception
        Throws:
        java.lang.Exception