Class WebSocketClientExtensionHandler
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- io.netty.channel.ChannelDuplexHandler
-
- io.netty.handler.codec.http.websocketx.extensions.WebSocketClientExtensionHandler
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler
,io.netty.channel.ChannelInboundHandler
,io.netty.channel.ChannelOutboundHandler
- Direct Known Subclasses:
WebSocketClientCompressionHandler
public class WebSocketClientExtensionHandler extends io.netty.channel.ChannelDuplexHandler
This handler negotiates and initializes the WebSocket Extensions. This implementation negotiates the extension with the server in a defined order, ensures that the successfully negotiated extensions are consistent between them, and initializes the channel pipeline with the extension decoder and encoder. Find a basic implementation for compression extensions at io.netty.handler.codec.http.websocketx.extensions.compression.WebSocketClientCompressionHandler.
-
-
Constructor Summary
Constructors Constructor Description WebSocketClientExtensionHandler(WebSocketClientExtensionHandshaker... extensionHandshakers)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
channelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg)
void
write(io.netty.channel.ChannelHandlerContext ctx, Object msg, io.netty.channel.ChannelPromise promise)
-
Methods inherited from class io.netty.channel.ChannelDuplexHandler
bind, close, connect, deregister, disconnect, flush, read
-
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
-
-
-
-
Constructor Detail
-
WebSocketClientExtensionHandler
public WebSocketClientExtensionHandler(WebSocketClientExtensionHandshaker... extensionHandshakers)
Constructor- Parameters:
extensionHandshakers
- The extension handshaker in priority order. A handshaker could be repeated many times with fallback configuration.
-
-
Method Detail
-
write
public void write(io.netty.channel.ChannelHandlerContext ctx, Object msg, io.netty.channel.ChannelPromise promise) throws Exception
- Specified by:
write
in interfaceio.netty.channel.ChannelOutboundHandler
- Overrides:
write
in classio.netty.channel.ChannelDuplexHandler
- Throws:
Exception
-
-