Class Parser

    • Constructor Detail

      • Parser

        public Parser​(org.eclipse.jetty.io.ByteBufferPool byteBufferPool,
                      Parser.Listener listener,
                      int maxDynamicTableSize,
                      int maxHeaderSize)
    • Method Detail

      • parse

        public void parse​(ByteBuffer buffer)

        Parses the given buffer bytes and emit events to a Parser.Listener.

        When this method returns, the buffer may not be fully consumed, so invocations to this method should be wrapped in a loop:

         while (buffer.hasRemaining())
             parser.parse(buffer);
         
        Parameters:
        buffer - the buffer to parse
      • parseHeader

        protected boolean parseHeader​(ByteBuffer buffer)
      • parseBody

        protected boolean parseBody​(ByteBuffer buffer)
      • getFrameType

        protected int getFrameType()
      • hasFlag

        protected boolean hasFlag​(int bit)
      • notifyConnectionFailure

        protected void notifyConnectionFailure​(int error,
                                               String reason)