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 ChannelFutureListener | |
| private final Http2ConnectionDecoder | |
| private final boolean | |
| private final Http2ConnectionEncoder | |
| private final boolean | |
| private long | |
| private static final Http2Headers | |
| private static final ByteBuf | |
| 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 | bind(ChannelHandlerContext
the ctx, SocketAddress ChannelHandlerContext for which the bind operation is madethe localAddress, ChannelPromise SocketAddress to which it should boundthe promise)ChannelPromise to notify once the operation completesImplements io. |
| public void | channelActive(ChannelHandlerContext ctx)
Overrides io. Implements io. ChannelHandlerContext#fireChannelActive() to forward
to the next ChannelInboundHandler in the ChannelPipeline.
|
| public void | channelInactive(ChannelHandlerContext ctx)
Overrides io. Implements io. ChannelHandlerContext#fireChannelInactive() to forward
to the next ChannelInboundHandler in the ChannelPipeline.
|
| public void | channelReadComplete(ChannelHandlerContext ctx)
Overrides io. Implements io. ChannelHandlerContext#fireChannelReadComplete() to forward
to the next ChannelInboundHandler in the ChannelPipeline.
|
| pack-priv final void | |
| public void | channelWritabilityChanged(ChannelHandlerContext ctx)
Overrides io. Implements io. ChannelHandlerContext#fireChannelWritabilityChanged() to forward
to the next ChannelInboundHandler in the ChannelPipeline.
|
| private void | checkCloseConnection(ChannelFuture
Represents the status that will be passed to the future)closeListener.Closes the connection if the graceful shutdown process has completed. |
| private static ByteBuf | clientPrefaceString(Http2Connection connection)
Returns the client preface string if this is a client connection, otherwise returns |
| public void | close(ChannelHandlerContext
the ctx, ChannelPromise ChannelHandlerContext for which the close operation is madethe promise)ChannelPromise to notify once the operation completesImplements io. |
| private void | |
| public void | closeStream(final Http2Stream
the stream to be closed and deactivated. stream, ChannelFuture 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, ChannelFuture If closing, the future after which to close the channel. future)Implements io. |
| public void | closeStreamRemote(Http2Stream
the stream to be half closed. stream, ChannelFuture If closing, the future after which to close the channel. future)Implements io. |
| public void | connect(ChannelHandlerContext
the ctx, SocketAddress ChannelHandlerContext for which the connect operation is madethe remoteAddress, SocketAddress SocketAddress to which it should connectthe localAddress, ChannelPromise SocketAddress which is used as source on connectthe promise)ChannelPromise to notify once the operation completesImplements io. |
| public Http2Connection | |
| protected void | decode(ChannelHandlerContext
the ctx, ByteBuf ChannelHandlerContext which this ByteToMessageDecoder belongs tothe in, List<Object> ByteBuf from which to read datathe out)List to which decoded messages should be addedImplements abstract io. ByteBuf to an other.
|
| public Http2ConnectionDecoder | |
| public void | deregister(ChannelHandlerContext
the ctx, ChannelPromise ChannelHandlerContext for which the close operation is madethe promise)ChannelPromise to notify once the operation completesImplements io. EventLoop.
|
| public void | disconnect(ChannelHandlerContext
the ctx, ChannelPromise ChannelHandlerContext for which the disconnect operation is madethe promise)ChannelPromise to notify once the operation completesImplements io. |
| private void | |
| private void | |
| public Http2ConnectionEncoder | |
| public void | exceptionCaught(ChannelHandlerContext ctx, Throwable cause)
Overrides io. Implements io. Http2Exception objects that were thrown from other handlers.
|
| public void | flush(ChannelHandlerContext
the ctx)ChannelHandlerContext for which the flush operation is madeImplements io. |
| protected Http2FrameWriter | |
| public ChannelFuture | 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 ByteBuf Http2Error.For diagnostic purposes (carries no semantic value). debugData, ChannelPromise Used to indicate the return status of this operation. promise)Implements io. errorCode is not
Http2Error#NO_ERROR.
|
| private ChannelFuture | goAway(ChannelHandlerContext ctx, Http2Exception cause, ChannelPromise promise)
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 | handlerAdded(ChannelHandlerContext ctx)
Overrides io. Implements io. ChannelHandler was added to the actual context and it's ready to handle events.
|
| 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 ChannelFutureListener | |
| 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
ChannelPromise 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 ByteBuf debugData, ChannelFuture future)
|
| private void | |
| public void | read(ChannelHandlerContext ctx)
Implements io. ChannelHandlerContext#read().
|
| public ChannelFuture | 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, ChannelPromise Http2Error.Used to indicate the return status of this operation. promise)Implements io. streamId is reset.
|
| private ChannelFuture | resetStream(final ChannelHandlerContext ctx, final Http2Stream stream, long errorCode, ChannelPromise promise)
|
| private ChannelFuture | resetUnknownStream(final ChannelHandlerContext ctx, int streamId, long errorCode, ChannelPromise promise)
Sends a |
| public void | write(ChannelHandlerContext
the ctx, Object ChannelHandlerContext for which the write operation is madethe message to write msg, ChannelPromise the promise)ChannelPromise to notify once the operation completesImplements io. |