@UnstableApi
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, write
channelActive, channelInactive, channelRead, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
public final void handlerAdded(io.netty.channel.ChannelHandlerContext ctx) throws Exception
handlerAdded
in interface io.netty.channel.ChannelHandler
handlerAdded
in class io.netty.channel.ChannelHandlerAdapter
Exception
protected void handlerAdded0(io.netty.channel.ChannelHandlerContext ctx) throws Exception
Exception
public final void handlerRemoved(io.netty.channel.ChannelHandlerContext ctx) throws Exception
handlerRemoved
in interface io.netty.channel.ChannelHandler
handlerRemoved
in class io.netty.channel.ChannelHandlerAdapter
Exception
protected void handlerRemoved0(io.netty.channel.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–2019 The Netty Project. All rights reserved.