public class Http2AlpnHandler
extends io.netty.handler.ssl.ApplicationProtocolNegotiationHandler
ChannelPipeline upon successful ALPN
to H2 by SslHandler. If the ALPN is not resulted in H2 - the ALPN promise is marked is failed and
that will notify the ALPN promise listener present in channel lifecycle.| Constructor and Description |
|---|
Http2AlpnHandler(io.netty.channel.ChannelPromise alpnPromise,
io.netty.handler.codec.http2.Http2Settings http2Settings) |
| Modifier and Type | Method and Description |
|---|---|
void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx) |
protected void |
configurePipeline(io.netty.channel.ChannelHandlerContext ctx,
java.lang.String protocol) |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Throwable cause) |
protected void |
handshakeFailure(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Throwable cause) |
userEventTriggeredchannelActive, channelRead, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChangedensureNotSharable, handlerAdded, handlerRemoved, isSharablepublic Http2AlpnHandler(io.netty.channel.ChannelPromise alpnPromise,
io.netty.handler.codec.http2.Http2Settings http2Settings)
alpnPromise - - The ChannelPromise created to track the status of ALPN. This handler Http2AlpnHandler
is not responsible for setting up the required call backs. This is expected to be setup by the
pipeline bootstrap code. This handler is only responsible for marking success or failure in
ALPN stage.http2Settings - - Http2 settingsprotected void configurePipeline(io.netty.channel.ChannelHandlerContext ctx,
java.lang.String protocol)
configurePipeline in class io.netty.handler.ssl.ApplicationProtocolNegotiationHandlerprotected void handshakeFailure(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Throwable cause)
handshakeFailure in class io.netty.handler.ssl.ApplicationProtocolNegotiationHandlerpublic void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
channelInactive in interface io.netty.channel.ChannelInboundHandlerchannelInactive in class io.netty.channel.ChannelInboundHandlerAdapterpublic void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Throwable cause)
exceptionCaught in interface io.netty.channel.ChannelHandlerexceptionCaught in interface io.netty.channel.ChannelInboundHandlerexceptionCaught in class io.netty.handler.ssl.ApplicationProtocolNegotiationHandler