Http2FrameListener
This class will read HTTP/2 frames and delegate the events to a Http2FrameListener
This interface enforces inbound flow control functionality through
Http2LocalFlowController
| Modifier and Type | Class and Description |
|---|---|
| private abstract class | |
| private static class | Http2ConnectionHandler.ClosingChannelFutureListener
Closes the channel when the future completes. |
| private class | |
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private Http2ConnectionHandler. | |
| private FutureListener | |
| private final Http2ConnectionDecoder | |
| private final boolean | |
| private final Http2ConnectionEncoder | |
| private final boolean | |
| private long | |
| private static final Http2Headers | |
| private static final Buffer | |
| private final Http2Settings | |
| private static final InternalLogger |
| Access | Constructor and Description |
|---|---|
| protected | Http2ConnectionHandler(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder, Http2Settings initialSettings)
|
| protected | Http2ConnectionHandler(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder, Http2Settings initialSettings, boolean decoupleCloseAndGoAway)
|
| protected | Http2ConnectionHandler(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder, Http2Settings initialSettings, boolean decoupleCloseAndGoAway, boolean flushPreface)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | channelActive(ChannelHandlerContext ctx)
Overrides default io. Channel of the ChannelHandlerContext is now active
|
| public void | channelExceptionCaught(ChannelHandlerContext ctx, Throwable cause)
Overrides default io. Http2Exception objects that were thrown from other handlers.
|
| public void | channelInactive(ChannelHandlerContext ctx)
Overrides io. Overrides default io. Channel of the ChannelHandlerContext was registered is now inactive and reached its
end of lifetime.
|
| public void | channelReadComplete(ChannelHandlerContext ctx)
Overrides io. Overrides default io. channelRead(ChannelHandlerContext, Object).
|
| pack-priv final void | |
| public void | channelWritabilityChanged(ChannelHandlerContext ctx)
Overrides default io. Channel changed.
|
| private void | checkCloseConnection(Future<?>
Represents the status that will be passed to the future)closeListener.Closes the connection if the graceful shutdown process has completed. |
| private static Buffer | clientPrefaceString(Http2Connection connection)
Returns the client preface string if this is a client connection, otherwise returns |
| public Future | close(ChannelHandlerContext
the ctx)ChannelHandlerContext for which the close operation is madeOverrides default io. |
| private void | |
| public void | closeStream(final Http2Stream
the stream to be closed and deactivated. stream, Future<Void> when completed if future)Http2Connection#numActiveStreams() is 0 then the underlying channel
will be closed.Implements io. stream.
|
| public void | closeStreamLocal(Http2Stream
the stream to be half closed. stream, Future<Void> If closing, the future after which to close the channel. future)Implements io. |
| public void | closeStreamRemote(Http2Stream
the stream to be half closed. stream, Future<Void> If closing, the future after which to close the channel. future)Implements io. |
| public Http2Connection | |
| protected void | decode(ChannelHandlerContext
the ctx, Buffer ChannelHandlerContext which this ByteToMessageDecoder belongs tothe in)Buffer from which to read dataImplements abstract io. Buffer to another.
|
| public Http2ConnectionDecoder | |
| private void | |
| public Http2ConnectionEncoder | |
| public void | flush(ChannelHandlerContext
the ctx)ChannelHandlerContext for which the flush operation is madeOverrides default io. |
| protected Http2FrameWriter | |
| public Future | goAway(final ChannelHandlerContext
The context used for communication and buffer allocation if necessary. ctx, final int The last stream that the local endpoint is claiming it will accept. lastStreamId, final long The rational as to why the connection is being closed. See errorCode, final Buffer Http2Error.For diagnostic purposes (carries no semantic value). debugData)Implements io. errorCode is not
Http2Error#NO_ERROR.
|
| private Future | goAway(ChannelHandlerContext ctx, Http2Exception cause)
Close the remote endpoint with a |
| public long | gracefulShutdownTimeoutMillis()
Get the amount of time (in milliseconds) this endpoint will wait for all streams to be closed before closing the connection during the graceful shutdown process. |
| public void | gracefulShutdownTimeoutMillis(long
the amount of time (in milliseconds) this endpoint will wait for all
streams to be closed before closing the connection during the graceful shutdown process. gracefulShutdownTimeoutMillis)Set the amount of time (in milliseconds) this endpoint will wait for all streams to be closed before closing the connection during the graceful shutdown process. |
| public void | |
| protected void | handlerRemoved0(ChannelHandlerContext ctx)
Overrides io. ByteToMessageDecoder was removed from the actual context and it doesn't
handle events anymore.
|
| protected void | handleServerHeaderDecodeSizeError(ChannelHandlerContext
the channel context ctx, Http2Stream the Http2Stream on which the header was received stream)Notifies client that this server has received headers that are larger than what it is willing to accept. |
| protected boolean | isGracefulShutdownComplete()
Called by the graceful shutdown logic to determine when it is safe to close the connection. |
| private FutureListener | |
| protected void | onConnectionError(ChannelHandlerContext
the channel context ctx, boolean true if the error was caused by an outbound operation.the exception that was caught cause, Http2Exception the http2Ex)Http2Exception that is embedded in the causality chain. This may
be null if it's an unknown exception.Handler for a connection error. |
| public void | onError(ChannelHandlerContext
The context used for communication and buffer allocation if necessary. ctx, boolean true if the error was caused by an outbound operation and so the corresponding
Promise was failed as well.the error. cause)Implements io. |
| public void | |
| public void | onHttpServerUpgrade(Http2Settings
the settings for the remote endpoint. settings)Handles the server-side (cleartext) upgrade from HTTP to HTTP/2. |
| protected void | onStreamError(ChannelHandlerContext
the channel context ctx, boolean true if the error was caused by an outbound operation.the exception that was caught cause, Http2Exception.the http2ExStreamException that is embedded in the causality chain.Handler for a stream error. |
| private boolean | |
| private static void | processGoAwayWriteResult(final ChannelHandlerContext ctx, final int lastStreamId, final long errorCode, final Buffer debugData, Future<?> future)
|
| private void | |
| public Future | resetStream(final ChannelHandlerContext
The context used for communication and buffer allocation if necessary. ctx, int The identifier of the stream to reset. streamId, long Justification as to why this stream is being reset. See errorCode)Http2Error.Implements io. streamId is reset.
|
| private Future | |
| private Future | resetUnknownStream(final ChannelHandlerContext ctx, int streamId, long errorCode)
Sends a |