| Modifier and Type | Class and Description |
|---|---|
| pack-priv static interface | Http2Parser.
Interface that must be implemented by the source of data for the parser. |
| pack-priv static interface | Http2Parser.
Interface that must be implemented to receive notifications from the parser as it processes incoming frames. |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final byte[] | |
| protected final String | |
| private final byte[] | |
| private volatile ByteBuffer | |
| private volatile int | |
| private volatile boolean | |
| private volatile HpackDecoder | |
| protected final Http2Parser. | |
| protected static final Log | |
| private final Http2Parser. | |
| protected static final StringManager |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| pack-priv void | readConnectionPreface(WebConnection
The connection webConnection, Stream The current stream stream)Read and validate the connection preface from input using blocking IO. |
| protected void | |
| protected void | |
| pack-priv boolean | Returns: true if a frame was read otherwise falseShould this method block until a frame is available if no frame is available immediately? block)
Deprecated
Unused. Will be removed in Tomcat 11 onwards.
Read and process a single frame. |
| pack-priv boolean | |
| protected boolean | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | readPushPromiseFrame(int
The pushed stream streamId, int The flags set in the frame header flags, int The size of the payload in bytes payloadSize, ByteBuffer The payload, if available buffer)This default server side implementation always throws an exception. |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | swallowPayload(int
Stream being swallowed streamId, int Type of HTTP/2 frame for which the bytes will be swallowed frameTypeId, int Number of bytes to swallow len, boolean Are the bytes to be swallowed padding bytes? isPadding, ByteBuffer Used with byteBuffer)Http2AsyncParser to access the data that has already been readSwallow some or all of the bytes from the payload of an HTTP/2 frame. |
| protected void |
| CLIENT_PREFACE_START | back to summary |
|---|---|
| pack-priv static final byte[] CLIENT_PREFACE_START | |
| connectionId | back to summary |
|---|---|
| protected final String connectionId | |
| frameHeaderBuffer | back to summary |
|---|---|
| private final byte[] frameHeaderBuffer | |
| headerReadBuffer | back to summary |
|---|---|
| private volatile ByteBuffer headerReadBuffer | |
| headersCurrentStream | back to summary |
|---|---|
| private volatile int headersCurrentStream | |
| headersEndStream | back to summary |
|---|---|
| private volatile boolean headersEndStream | |
| hpackDecoder | back to summary |
|---|---|
| private volatile HpackDecoder hpackDecoder | |
| input | back to summary |
|---|---|
| protected final Http2Parser. | |
| log | back to summary |
|---|---|
| protected static final Log log | |
| output | back to summary |
|---|---|
| private final Http2Parser. | |
| sm | back to summary |
|---|---|
| protected static final StringManager sm | |
| Http2Parser | back to summary |
|---|---|
| pack-priv Http2Parser(String connectionId, Http2Parser. | |
| onHeadersComplete | back to summary |
|---|---|
| protected void onHeadersComplete(int streamId) throws Http2Exception | |
| readConnectionPreface | back to summary |
|---|---|
| pack-priv void readConnectionPreface(WebConnection webConnection, Stream stream) throws Http2Exception Read and validate the connection preface from input using blocking IO.
| |
| readContinuationFrame | back to summary |
|---|---|
| protected void readContinuationFrame(int streamId, int flags, int payloadSize, ByteBuffer buffer) throws Http2Exception, IOException | |
| readDataFrame | back to summary |
|---|---|
| protected void readDataFrame(int streamId, int flags, int payloadSize, ByteBuffer buffer) throws Http2Exception, IOException | |
| readFrame | back to summary |
|---|---|
| pack-priv boolean readFrame(boolean block) throws Http2Exception, IOException
Deprecated Unused. Will be removed in Tomcat 11 onwards. Read and process a single frame. Once the start of a frame is read, the remainder will be read using blocking IO.
| |
| readFrame | back to summary |
|---|---|
| pack-priv boolean readFrame() throws Http2Exception, IOException Read and process a single frame. The initial read is non-blocking to determine if a frame is present. Once the start of a frame is read, the remainder will be read using blocking IO.
| |
| readFrame | back to summary |
|---|---|
| protected boolean readFrame(boolean block, FrameType expected) throws IOException, Http2Exception | |
| readGoawayFrame | back to summary |
|---|---|
| protected void readGoawayFrame(int payloadSize, ByteBuffer buffer) throws IOException | |
| readHeaderPayload | back to summary |
|---|---|
| protected void readHeaderPayload(int streamId, int payloadSize, ByteBuffer buffer) throws Http2Exception, IOException | |
| readHeadersFrame | back to summary |
|---|---|
| protected void readHeadersFrame(int streamId, int flags, int payloadSize, ByteBuffer buffer) throws Http2Exception, IOException | |
| readPingFrame | back to summary |
|---|---|
| protected void readPingFrame(int flags, ByteBuffer buffer) throws IOException | |
| readPriorityFrame | back to summary |
|---|---|
| protected void readPriorityFrame(int streamId, ByteBuffer buffer) throws IOException | |
| readPriorityUpdateFrame | back to summary |
|---|---|
| protected void readPriorityUpdateFrame(int payloadSize, ByteBuffer buffer) throws Http2Exception, IOException | |
| readPushPromiseFrame | back to summary |
|---|---|
| protected void readPushPromiseFrame(int streamId, int flags, int payloadSize, ByteBuffer buffer) throws Http2Exception, IOException This default server side implementation always throws an exception. If re-used for client side parsing, this method should be overridden with an appropriate implementation.
| |
| readRstFrame | back to summary |
|---|---|
| protected void readRstFrame(int streamId, ByteBuffer buffer) throws Http2Exception, IOException | |
| readSettingsFrame | back to summary |
|---|---|
| protected void readSettingsFrame(int flags, int payloadSize, ByteBuffer buffer) throws Http2Exception, IOException | |
| readUnknownFrame | back to summary |
|---|---|
| protected void readUnknownFrame(int streamId, int frameTypeId, int flags, int payloadSize, ByteBuffer buffer) throws IOException | |
| readWindowUpdateFrame | back to summary |
|---|---|
| protected void readWindowUpdateFrame(int streamId, ByteBuffer buffer) throws Http2Exception, IOException | |
| swallowPayload | back to summary |
|---|---|
| protected void swallowPayload(int streamId, int frameTypeId, int len, boolean isPadding, ByteBuffer byteBuffer) throws IOException, ConnectionException Swallow some or all of the bytes from the payload of an HTTP/2 frame.
| |
| validateFrame | back to summary |
|---|---|
| protected void validateFrame(FrameType expected, FrameType frameType, int streamId, int flags, int payloadSize) throws Http2Exception | |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the buffer was filled otherwise falseShould the first read into the provided buffer be a blocking read or not. block, byte[] Buffer to fill data, int Position in buffer to start writing offset, int Number of bytes to read length)Fill the given array with data unless non-blocking is requested and no data is available. |
| public default boolean | |
| public default boolean | |
| public int |
| fill | back to summary |
|---|---|
| public boolean fill(boolean block, byte[] data, int offset, int length) throws IOException Fill the given array with data unless non-blocking is requested and no data is available. If any data is available then the buffer will be filled using blocking I/O.
| |
| fill | back to summary |
|---|---|
| public default boolean fill(boolean block, byte[] data) throws IOException | |
| fill | back to summary |
|---|---|
| public default boolean fill(boolean block, ByteBuffer data, int len) throws IOException | |
| getMaxFrameSize | back to summary |
|---|---|
| public int getMaxFrameSize() | |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public HpackDecoder | |
| public void | |
| public void | |
| public void | |
| public HpackDecoder. | |
| public void | |
| public void | |
| public void | onSwallowedDataFramePayload(int
The stream on which the payload that has been swallowed was received streamId, int The number of bytes that the parser swallowed. swallowedDataBytesCount)Notification triggered when the parser swallows some or all of a DATA frame payload without writing it to the
ByteBuffer returned by |
| public void | onSwallowedUnknownFrame(int
The stream on which the swallowed frame was received streamId, int The (unrecognised) type of swallowed frame frameTypeId, int The flags set in the header of the swallowed frame flags, int The payload size of the swallowed frame size)Notification triggered when the parser swallows the payload of an unknown frame. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public ByteBuffer |
| endRequestBodyFrame | back to summary |
|---|---|
| public void endRequestBodyFrame(int streamId, int dataLength) throws Http2Exception, IOException | |
| getHpackDecoder | back to summary |
|---|---|
| public HpackDecoder getHpackDecoder() | |
| goaway | back to summary |
|---|---|
| public void goaway(int lastStreamId, long errorCode, String debugData) | |
| headersContinue | back to summary |
|---|---|
| public void headersContinue(int payloadSize, boolean endOfHeaders) | |
| headersEnd | back to summary |
|---|---|
| public void headersEnd(int streamId, boolean endOfStream) throws Http2Exception | |
| headersStart | back to summary |
|---|---|
| public HpackDecoder. | |
| increaseOverheadCount | back to summary |
|---|---|
| public void increaseOverheadCount(FrameType frameType) | |
| incrementWindowSize | back to summary |
|---|---|
| public void incrementWindowSize(int streamId, int increment) throws Http2Exception | |
| onSwallowedDataFramePayload | back to summary |
|---|---|
| public void onSwallowedDataFramePayload(int streamId, int swallowedDataBytesCount) throws ConnectionException, IOException Notification triggered when the parser swallows some or all of a DATA frame payload without writing it to the
ByteBuffer returned by
| |
| onSwallowedUnknownFrame | back to summary |
|---|---|
| public void onSwallowedUnknownFrame(int streamId, int frameTypeId, int flags, int size) throws IOException Notification triggered when the parser swallows the payload of an unknown frame.
| |
| pingReceive | back to summary |
|---|---|
| public void pingReceive(byte[] payload, boolean ack) throws IOException | |
| priorityUpdate | back to summary |
|---|---|
| public void priorityUpdate(int prioritizedStreamID, Priority p) throws Http2Exception | |
| receivedEndOfStream | back to summary |
|---|---|
| public void receivedEndOfStream(int streamId) throws ConnectionException | |
| reset | back to summary |
|---|---|
| public void reset(int streamId, long errorCode) throws Http2Exception | |
| setting | back to summary |
|---|---|
| public void setting(Setting setting, long value) throws ConnectionException | |
| settingsEnd | back to summary |
|---|---|
| public void settingsEnd(boolean ack) throws IOException | |
| startRequestBodyFrame | back to summary |
|---|---|
| public ByteBuffer startRequestBodyFrame(int streamId, int payloadSize, boolean endOfStream) throws Http2Exception | |