Class WebSocketServerExtensionHandler

  • All Implemented Interfaces:
    io.netty5.channel.ChannelHandler
    Direct Known Subclasses:
    WebSocketServerCompressionHandler

    public class WebSocketServerExtensionHandler
    extends Object
    implements io.netty5.channel.ChannelHandler
    This handler negotiates and initializes the WebSocket Extensions. It negotiates the extensions based on the client desired 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.netty5.handler.codec.http.websocketx.extensions.compression.WebSocketServerCompressionHandler.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface io.netty5.channel.ChannelHandler

        io.netty5.channel.ChannelHandler.Sharable
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void channelRead​(io.netty5.channel.ChannelHandlerContext ctx, Object msg)  
      io.netty5.util.concurrent.Future<Void> write​(io.netty5.channel.ChannelHandlerContext ctx, Object msg)  
      • Methods inherited from interface io.netty5.channel.ChannelHandler

        bind, channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, close, connect, deregister, disconnect, exceptionCaught, flush, handlerAdded, handlerRemoved, read, register, userEventTriggered
    • Constructor Detail

      • WebSocketServerExtensionHandler

        public WebSocketServerExtensionHandler​(WebSocketServerExtensionHandshaker... extensionHandshakers)
        Constructor
        Parameters:
        extensionHandshakers - The extension handshaker in priority order. A handshaker could be repeated many times with fallback configuration.
    • Method Detail

      • channelRead

        public void channelRead​(io.netty5.channel.ChannelHandlerContext ctx,
                                Object msg)
                         throws Exception
        Specified by:
        channelRead in interface io.netty5.channel.ChannelHandler
        Throws:
        Exception
      • write

        public io.netty5.util.concurrent.Future<Void> write​(io.netty5.channel.ChannelHandlerContext ctx,
                                                            Object msg)
        Specified by:
        write in interface io.netty5.channel.ChannelHandler