public abstract class Http2ChannelDuplexHandler extends 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.
ChannelHandler.Sharable
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(ChannelHandlerContext ctx)
Do nothing by default, sub-classes may override this method.
|
protected void |
handlerAdded0(ChannelHandlerContext ctx) |
void |
handlerRemoved(ChannelHandlerContext ctx)
Do nothing by default, sub-classes may override this method.
|
protected void |
handlerRemoved0(ChannelHandlerContext ctx) |
Http2FrameStream |
newStream()
Creates a new
Http2FrameStream object. |
bind, close, connect, deregister, disconnect, flush, read, write
channelActive, channelInactive, channelRead, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
ensureNotSharable, isSharable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
exceptionCaught
public final void handlerAdded(ChannelHandlerContext ctx) throws Exception
ChannelHandlerAdapter
handlerAdded
in interface ChannelHandler
handlerAdded
in class ChannelHandlerAdapter
Exception
protected void handlerAdded0(ChannelHandlerContext ctx) throws Exception
Exception
public final void handlerRemoved(ChannelHandlerContext ctx) throws Exception
ChannelHandlerAdapter
handlerRemoved
in interface ChannelHandler
handlerRemoved
in class ChannelHandlerAdapter
Exception
protected void handlerRemoved0(ChannelHandlerContext ctx) throws Exception
Exception
public 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.
Http2Exception
Copyright © 2008–2024 The Netty Project. All rights reserved.