Package org.eclipse.jetty.http2.parser
Class Parser
java.lang.Object
org.eclipse.jetty.http2.parser.Parser
- Direct Known Subclasses:
ServerParser
The HTTP/2 protocol parser.
This parser makes use of the HeaderParser
and of
BodyParser
s to parse HTTP/2 frames.
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionParser
(ByteBufferPool byteBufferPool, int maxHeaderSize) Parser
(ByteBufferPool byteBufferPool, int maxTableCapacity, int maxHeaderSize) Deprecated.Parser
(ByteBufferPool byteBufferPool, int maxTableSize, int maxHeaderSize, RateControl rateControl) Deprecated.Parser
(ByteBufferPool byteBufferPool, int maxHeaderSize, RateControl rateControl) -
Method Summary
Modifier and TypeMethodDescriptionlong
protected int
protected Parser.Listener
int
Deprecated.int
int
protected boolean
hasFlag
(int bit) void
init
(Parser.Listener listener) protected void
notifyConnectionFailure
(int error, String reason) void
parse
(ByteBuffer buffer) Parses the givenbuffer
bytes and emit events to aParser.Listener
.protected boolean
parseBody
(ByteBuffer buffer) protected boolean
parseHeader
(ByteBuffer buffer) void
setMaxFrameLength
(int maxFrameSize) Deprecated.void
setMaxFrameSize
(int maxFrameSize) void
setMaxSettingsKeys
(int maxSettingsKeys)
-
Constructor Details
-
Parser
Deprecated. -
Parser
-
Parser
@Deprecated public Parser(ByteBufferPool byteBufferPool, int maxTableSize, int maxHeaderSize, RateControl rateControl) Deprecated. -
Parser
-
-
Method Details
-
init
-
getListener
-
getHpackDecoder
-
getBeginNanoTime
public long getBeginNanoTime() -
parse
Parses the given
buffer
bytes and emit events to aParser.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
-
parseBody
-
getFrameType
protected int getFrameType() -
hasFlag
protected boolean hasFlag(int bit) -
getMaxFrameLength
Deprecated. -
setMaxFrameLength
Deprecated. -
getMaxFrameSize
public int getMaxFrameSize() -
setMaxFrameSize
public void setMaxFrameSize(int maxFrameSize) -
getMaxSettingsKeys
public int getMaxSettingsKeys() -
setMaxSettingsKeys
public void setMaxSettingsKeys(int maxSettingsKeys) -
notifyConnectionFailure
-