Http2FrameListener.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | onDataRead(ChannelHandlerContext
the context from the handler where the frame was read. ctx, int the subject stream for the frame. streamId, Buffer payload buffer for the frame. This buffer will be closed by the codec when the method returns
(the buffer will be inaccessible after the method call). data, int additional bytes that should be added to obscure the true content size. Must be between 0 and
256 (inclusive). padding, boolean Indicates whether this is the last frame to be sent from the remote endpoint for this stream. endOfStream)Implements io. DATA frame.
|
| public void | onGoAwayRead(ChannelHandlerContext
the context from the handler where the frame was read. ctx, int the last known stream of the remote endpoint. lastStreamId, long the error code, if abnormal closure. errorCode, Buffer application-defined debug data. This buffer will be closed by the codec when the method returns
(the buffer will be inaccessible after the method call). debugData)Implements io. GO_AWAY frame.
|
| public void | onHeadersRead(ChannelHandlerContext
the context from the handler where the frame was read. ctx, int the subject stream for the frame. streamId, Http2Headers the received headers. headers, int additional bytes that should be added to obscure the true content size. Must be between 0 and
256 (inclusive). padding, boolean Indicates whether this is the last frame to be sent from the remote endpoint
for this stream. endStream)Implements io. HEADERS frame.
|
| public void | onHeadersRead(ChannelHandlerContext
the context from the handler where the frame was read. ctx, int the subject stream for the frame. streamId, Http2Headers the received headers. headers, int the stream on which this stream depends, or 0 if dependent on the
connection. streamDependency, short the new weight for the stream. weight, boolean whether or not the stream should be the exclusive dependent of its parent. exclusive, int additional bytes that should be added to obscure the true content size. Must be between 0 and
256 (inclusive). padding, boolean Indicates whether this is the last frame to be sent from the remote endpoint
for this stream. endStream)Implements io. HEADERS frame with priority information specified.
|
| public void | onPingAckRead(ChannelHandlerContext
the context from the handler where the frame was read. ctx, long the payload of the frame. data)Implements io. PING acknowledgment.
|
| public void | onPingRead(ChannelHandlerContext
the context from the handler where the frame was read. ctx, long the payload of the frame. data)Implements io. PING frame.
|
| public void | onPriorityRead(ChannelHandlerContext
the context from the handler where the frame was read. ctx, int the subject stream for the frame. streamId, int the stream on which this stream depends, or 0 if dependent on the
connection. streamDependency, short the new weight for the stream. weight, boolean whether or not the stream should be the exclusive dependent of its parent. exclusive)Implements io. PRIORITY frame.
|
| public void | onPushPromiseRead(ChannelHandlerContext
the context from the handler where the frame was read. ctx, int the stream the frame was sent on. streamId, int the ID of the promised stream. promisedStreamId, Http2Headers the received headers. headers, int additional bytes that should be added to obscure the true content size. Must be between 0 and
256 (inclusive). padding)Implements io. PUSH_PROMISE frame.
|
| public void | onRstStreamRead(ChannelHandlerContext
the context from the handler where the frame was read. ctx, int the stream that is terminating. streamId, long the error code identifying the type of failure. errorCode)Implements io. RST_STREAM frame.
|
| public void | onSettingsAckRead(ChannelHandlerContext
the context from the handler where the frame was read. ctx)Implements io. SETTINGS acknowledgment frame.
|
| public void | onSettingsRead(ChannelHandlerContext
the context from the handler where the frame was read. ctx, Http2Settings the settings received from the remote endpoint. settings)Implements io. SETTINGS frame.
|
| public void | onUnknownFrame(ChannelHandlerContext
the context from the handler where the frame was read. ctx, byte the frame type from the HTTP/2 header. frameType, int the stream the frame was sent on. streamId, Http2Flags the flags in the frame header. flags, Buffer the payload of the frame. This buffer will be closed by the codec when the method returns
(the buffer will be inaccessible after the method call). payload)Implements io. |
| public void | onWindowUpdateRead(ChannelHandlerContext
the context from the handler where the frame was read. ctx, int the stream the frame was sent on. streamId, int the increased number of bytes of the remote endpoint's flow
control window. windowSizeIncrement)Implements io. WINDOW_UPDATE frame.
|
| Http2FrameAdapter | back to summary |
|---|---|
| public Http2FrameAdapter() | |
| onDataRead | back to summary |
|---|---|
| public int onDataRead(ChannelHandlerContext ctx, int streamId, Buffer data, int padding, boolean endOfStream) throws Http2Exception Implements io. Doc from io. Handles an inbound
| |
| onGoAwayRead | back to summary |
|---|---|
| public void onGoAwayRead(ChannelHandlerContext ctx, int lastStreamId, long errorCode, Buffer debugData) throws Http2Exception Implements io. Doc from io. Handles an inbound
| |
| onHeadersRead | back to summary |
|---|---|
| public void onHeadersRead(ChannelHandlerContext ctx, int streamId, Http2Headers headers, int padding, boolean endStream) throws Http2Exception Implements io. Doc from io. Handles an inbound
Only one of the following methods will be called for each
To say it another way; the
| |
| onHeadersRead | back to summary |
|---|---|
| public void onHeadersRead(ChannelHandlerContext ctx, int streamId, Http2Headers headers, int streamDependency, short weight, boolean exclusive, int padding, boolean endStream) throws Http2Exception Implements io. Doc from io. Handles an inbound
Only one of the following methods will be called for each
To say it another way; the
| |
| onPingAckRead | back to summary |
|---|---|
| public void onPingAckRead(ChannelHandlerContext ctx, long data) throws Http2Exception Implements io. Doc from io. Handles an inbound
| |
| onPingRead | back to summary |
|---|---|
| public void onPingRead(ChannelHandlerContext ctx, long data) throws Http2Exception Implements io. Doc from io. Handles an inbound
| |
| onPriorityRead | back to summary |
|---|---|
| public void onPriorityRead(ChannelHandlerContext ctx, int streamId, int streamDependency, short weight, boolean exclusive) throws Http2Exception Implements io. Doc from io. Handles an inbound
Note that is it possible to have this method called and no stream object exist for either
| |
| onPushPromiseRead | back to summary |
|---|---|
| public void onPushPromiseRead(ChannelHandlerContext ctx, int streamId, int promisedStreamId, Http2Headers headers, int padding) throws Http2Exception Implements io. Doc from io. Handles an inbound Promised requests MUST be authoritative, cacheable, and safe. See [RFC 7540], Section 8.2.
Only one of the following methods will be called for each
To say it another way; the
| |
| onRstStreamRead | back to summary |
|---|---|
| public void onRstStreamRead(ChannelHandlerContext ctx, int streamId, long errorCode) throws Http2Exception Implements io. Doc from io. Handles an inbound
| |
| onSettingsAckRead | back to summary |
|---|---|
| public void onSettingsAckRead(ChannelHandlerContext ctx) throws Http2Exception Implements io. Doc from io. Handles an inbound
| |
| onSettingsRead | back to summary |
|---|---|
| public void onSettingsRead(ChannelHandlerContext ctx, Http2Settings settings) throws Http2Exception Implements io. Doc from io. Handles an inbound
| |
| onUnknownFrame | back to summary |
|---|---|
| public void onUnknownFrame(ChannelHandlerContext ctx, byte frameType, int streamId, Http2Flags flags, Buffer payload) Implements io. Doc from io. Handler for a frame not defined by the HTTP/2 spec.
| |
| onWindowUpdateRead | back to summary |
|---|---|
| public void onWindowUpdateRead(ChannelHandlerContext ctx, int streamId, int windowSizeIncrement) throws Http2Exception Implements io. Doc from io. Handles an inbound
| |