public class WebSocketClientExtensionHandler extends ChannelDuplexHandler
ChannelHandler.Sharable
Constructor and Description |
---|
WebSocketClientExtensionHandler(WebSocketClientExtensionHandshaker... extensionHandshakers)
构造函数
|
Modifier and Type | Method and Description |
---|---|
void |
channelRead(ChannelHandlerContext ctx, java.lang.Object msg)
|
void |
write(ChannelHandlerContext ctx, java.lang.Object msg, ChannelPromise promise)
|
bind, close, connect, deregister, disconnect, flush, read
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
exceptionCaught, handlerAdded, handlerRemoved
public WebSocketClientExtensionHandler(WebSocketClientExtensionHandshaker... extensionHandshakers)
extensionHandshakers
- 按优先级顺序的扩展握手。
握手可以在回退配置中重复多次。
public void write(ChannelHandlerContext ctx, java.lang.Object msg, ChannelPromise promise) throws java.lang.Exception
ChannelDuplexHandler
ChannelOutboundInvoker.write(Object, ChannelPromise)
转发到ChannelPipeline
中的下一个ChannelOutboundHandler
。
子类可以重写此方法来更改行为。
write
在界面
ChannelOutboundHandler
write
在课堂上
ChannelDuplexHandler
ctx
- 为其写入操作的ChannelHandlerContext
msg
- 写信息
promise
- ChannelPromise
通知操作完成
java.lang.Exception
- 如果发生错误则抛出
public void channelRead(ChannelHandlerContext ctx, java.lang.Object msg) throws java.lang.Exception
ChannelInboundHandlerAdapter
ChannelHandlerContext.fireChannelRead(Object)
转发到ChannelPipeline
中的下一个ChannelInboundHandler
。
子类可以重写此方法来更改行为。
channelRead
在界面
ChannelInboundHandler
channelRead
在课程
ChannelInboundHandlerAdapter
java.lang.Exception
Copyright © 2008–2018 The Netty Project. All rights reserved.