public abstract class Http2ChannelDuplexHandler
extends io.netty.channel.ChannelDuplexHandler
ChannelDuplexHandler providing additional functionality for HTTP/2. Specifically it allows to:
newStream().forEachActiveStream(Http2FrameStreamVisitor).The Http2FrameCodec is required to be part of the ChannelPipeline before this handler is added,
or else an IllegalStateException will be thrown.
| Constructor and Description |
|---|
Http2ChannelDuplexHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
forEachActiveStream(Http2FrameStreamVisitor streamVisitor)
Allows to iterate over all currently active streams.
|
void |
handlerAdded(io.netty.channel.ChannelHandlerContext ctx) |
protected void |
handlerAdded0(io.netty.channel.ChannelHandlerContext ctx) |
void |
handlerRemoved(io.netty.channel.ChannelHandlerContext ctx) |
protected void |
handlerRemoved0(io.netty.channel.ChannelHandlerContext ctx) |
Http2FrameStream |
newStream()
Creates a new
Http2FrameStream object. |
bind, close, connect, deregister, disconnect, flush, read, writechannelActive, channelInactive, channelRead, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredpublic final void handlerAdded(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
handlerAdded in interface io.netty.channel.ChannelHandlerhandlerAdded in class io.netty.channel.ChannelHandlerAdapterExceptionprotected void handlerAdded0(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
Exceptionpublic final void handlerRemoved(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
handlerRemoved in interface io.netty.channel.ChannelHandlerhandlerRemoved in class io.netty.channel.ChannelHandlerAdapterExceptionprotected void handlerRemoved0(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
Exceptionpublic final Http2FrameStream newStream()
Http2FrameStream object.
This method is thread-safe.
protected final void forEachActiveStream(Http2FrameStreamVisitor streamVisitor) throws Http2Exception
This method may only be called from the eventloop thread.
Http2ExceptionCopyright © 2008–2025 The Netty Project. All rights reserved.