@UnstableApi 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
构造器和说明 |
---|
Http2ChannelDuplexHandler() |
限定符和类型 | 方法和说明 |
---|---|
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 java.lang.Exception
ChannelHandlerAdapter
handlerAdded
在接口中 ChannelHandler
handlerAdded
在类中 ChannelHandlerAdapter
java.lang.Exception
protected void handlerAdded0(ChannelHandlerContext ctx) throws java.lang.Exception
java.lang.Exception
public final void handlerRemoved(ChannelHandlerContext ctx) throws java.lang.Exception
ChannelHandlerAdapter
handlerRemoved
在接口中 ChannelHandler
handlerRemoved
在类中 ChannelHandlerAdapter
java.lang.Exception
protected void handlerRemoved0(ChannelHandlerContext ctx) throws java.lang.Exception
java.lang.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