public abstract class AbstractHttp2ConnectionHandler
extends io.netty.handler.codec.http2.Http2ConnectionHandler
Http2ConnectionHandler with some workarounds and additional extension points.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractHttp2ConnectionHandler(io.netty.handler.codec.http2.Http2ConnectionDecoder decoder,
io.netty.handler.codec.http2.Http2ConnectionEncoder encoder,
io.netty.handler.codec.http2.Http2Settings initialSettings)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close(io.netty.channel.ChannelHandlerContext ctx,
io.netty.channel.ChannelPromise promise) |
io.netty.channel.ChannelFuture |
goAway(io.netty.channel.ChannelHandlerContext ctx,
int lastStreamId,
long errorCode,
io.netty.buffer.ByteBuf debugData,
io.netty.channel.ChannelPromise promise) |
boolean |
isClosing()
Returns
true if ChannelOutboundInvoker.close() has been called. |
protected abstract boolean |
needsImmediateDisconnection()
Returns
true if the connection has to be closed immediately rather than sending a GOAWAY
frame and waiting for the remaining streams. |
protected void |
onConnectionError(io.netty.channel.ChannelHandlerContext ctx,
boolean outbound,
Throwable cause,
io.netty.handler.codec.http2.Http2Exception http2Ex) |
bind, channelActive, channelInactive, channelReadComplete, channelWritabilityChanged, closeStream, closeStreamLocal, closeStreamRemote, connect, connection, decode, decoder, deregister, disconnect, encoder, exceptionCaught, flush, frameWriter, gracefulShutdownTimeoutMillis, gracefulShutdownTimeoutMillis, handlerAdded, handlerRemoved0, handleServerHeaderDecodeSizeError, isGracefulShutdownComplete, onError, onHttpClientUpgrade, onHttpServerUpgrade, onStreamError, read, resetStream, writeactualReadableBytes, callDecode, channelRead, decodeLast, discardSomeReadBytes, handlerRemoved, internalBuffer, isSingleDecode, setCumulator, setDiscardAfterReads, setSingleDecode, userEventTriggeredchannelRegistered, channelUnregisteredprotected AbstractHttp2ConnectionHandler(io.netty.handler.codec.http2.Http2ConnectionDecoder decoder,
io.netty.handler.codec.http2.Http2ConnectionEncoder encoder,
io.netty.handler.codec.http2.Http2Settings initialSettings)
public boolean isClosing()
true if ChannelOutboundInvoker.close() has been called.protected void onConnectionError(io.netty.channel.ChannelHandlerContext ctx,
boolean outbound,
Throwable cause,
io.netty.handler.codec.http2.Http2Exception http2Ex)
onConnectionError in class io.netty.handler.codec.http2.Http2ConnectionHandlerpublic io.netty.channel.ChannelFuture goAway(io.netty.channel.ChannelHandlerContext ctx,
int lastStreamId,
long errorCode,
io.netty.buffer.ByteBuf debugData,
io.netty.channel.ChannelPromise promise)
goAway in interface io.netty.handler.codec.http2.Http2LifecycleManagergoAway in class io.netty.handler.codec.http2.Http2ConnectionHandlerpublic void close(io.netty.channel.ChannelHandlerContext ctx,
io.netty.channel.ChannelPromise promise)
throws Exception
close in interface io.netty.channel.ChannelOutboundHandlerclose in class io.netty.handler.codec.http2.Http2ConnectionHandlerExceptionprotected abstract boolean needsImmediateDisconnection()
true if the connection has to be closed immediately rather than sending a GOAWAY
frame and waiting for the remaining streams. This method should return true when:
ClientFactory is being closed.Server is being stopped.Copyright © 2020 LeanCloud. All rights reserved.