Interface PostUpgradeHook


public interface PostUpgradeHook
Optional interface that a Consumer returned by a WebSocket handler factory may implement to receive a callback after the Netty-side WebSocket handshake has completed.

Implementing this hook allows the handler to rewire the Netty pipeline (e.g. replace the Message-layer handlers with a lighter-weight frame-level forwarder) once the channel is fully in WebSocket mode.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onUpgradeComplete(io.netty.channel.ChannelHandlerContext ctx)
    Called on the Netty IO thread immediately after the WebSocketServerHandshaker handshake future succeeds.
  • Method Details

    • onUpgradeComplete

      void onUpgradeComplete(io.netty.channel.ChannelHandlerContext ctx)
      Called on the Netty IO thread immediately after the WebSocketServerHandshaker handshake future succeeds. The channel is now in WebSocket mode; callers may freely modify ctx.pipeline().