@UnstableApi public abstract class Http2ChannelDuplexHandler extends ChannelDuplexHandler
ChannelDuplexHandler为HTTP / 2提供附加功能。
具体来说,它允许:
newStream()创建新的出站流。 forEachActiveStream(Http2FrameStreamVisitor)迭代所有活动流。 在添加该处理程序之前, Http2FrameCodec需要成为ChannelPipeline的一部分,否则将抛出IllegalStateException 。
ChannelHandler.Sharable| Constructor and Description |
|---|
Http2ChannelDuplexHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
forEachActiveStream(Http2FrameStreamVisitor streamVisitor)
允许遍历所有当前活动的流。
|
void |
handlerAdded(ChannelHandlerContext ctx)
子类可以忽略这个方法。
|
protected void |
handlerAdded0(ChannelHandlerContext ctx) |
void |
handlerRemoved(ChannelHandlerContext ctx)
子类可以忽略这个方法。
|
protected void |
handlerRemoved0(ChannelHandlerContext ctx) |
Http2FrameStream |
newStream()
创建一个新的 Http2FrameStream对象。
|
bind, close, connect, deregister, disconnect, flush, read, writechannelActive, channelInactive, channelRead, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredensureNotSharable, isSharableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexceptionCaughtpublic 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对象。
这种方法是线程安全的 。
protected final void forEachActiveStream(Http2FrameStreamVisitor streamVisitor) throws Http2Exception
该方法只能从事件回调线程调用。
Copyright © 2008–2018 The Netty Project. All rights reserved.