public class Parser extends Object
The HTTP/2 protocol parser.
This parser makes use of the HeaderParser and of
BodyParsers to parse HTTP/2 frames.
| Modifier and Type | Class and Description |
|---|---|
static interface |
Parser.Listener |
| Constructor and Description |
|---|
Parser(ByteBufferPool byteBufferPool,
Parser.Listener listener,
int maxDynamicTableSize,
int maxHeaderSize) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
notifyConnectionFailure(int error,
String reason) |
void |
parse(ByteBuffer buffer)
Parses the given
buffer bytes and emit events to a Parser.Listener. |
public Parser(ByteBufferPool byteBufferPool, Parser.Listener listener, int maxDynamicTableSize, int maxHeaderSize)
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);
buffer - the buffer to parseprotected void notifyConnectionFailure(int error,
String reason)
Copyright © 1995-2015 Webtide. All Rights Reserved.