Class WebSocketMicroBootstrapFlow

java.lang.Object
com.iohao.net.external.core.netty.micro.WebSocketMicroBootstrapFlow
All Implemented Interfaces:
ExternalSettingAware, MicroBootstrapFlow<io.netty.bootstrap.ServerBootstrap>

public class WebSocketMicroBootstrapFlow extends Object
Netty bootstrap flow for WebSocket-based external client connections.
Author:
渔民小镇
date:
2023-05-31
  • Field Details

  • Constructor Details

    • WebSocketMicroBootstrapFlow

      public WebSocketMicroBootstrapFlow()
  • Method Details

    • option

      public void option(io.netty.bootstrap.ServerBootstrap bootstrap)
      Description copied from interface: MicroBootstrapFlow
      Configures some options for the server. The server is not yet started at this point.
      Parameters:
      bootstrap - The server bootstrap.
    • pipelineCodec

      public void pipelineCodec(PipelineContext context)
      Description copied from interface: MicroBootstrapFlow
      Orchestrates the encoding and decoding logic.
      Parameters:
      context - The PipelineContext.
    • websocketHandler

      public void websocketHandler(PipelineContext context)
      Install the WebSocket protocol handler.
      Parameters:
      context - Netty pipeline adapter
    • httpHandler

      public void httpHandler(PipelineContext context)
      Install HTTP handlers required before the WebSocket protocol upgrade.
      Parameters:
      context - Netty pipeline adapter
    • setExternalSetting

      public void setExternalSetting(ExternalSetting setting)
      Description copied from interface: ExternalSettingAware
      Inject the external setting after it has been assembled.
      Specified by:
      setExternalSetting in interface ExternalSettingAware
      Parameters:
      setting - external setting for the current server
    • channelInitializer

      public void channelInitializer(io.netty.bootstrap.ServerBootstrap bootstrap)
      Description copied from interface: MicroBootstrapFlow
      Arranges some business orchestration for the server. The server is not yet started at this point.
      Specified by:
      channelInitializer in interface MicroBootstrapFlow<io.netty.bootstrap.ServerBootstrap>
      Parameters:
      bootstrap - The server bootstrap.
    • pipelineIdle

      public void pipelineIdle(PipelineContext context)
      Description copied from interface: MicroBootstrapFlow
      Orchestrates the heartbeat-related logic.
      Specified by:
      pipelineIdle in interface MicroBootstrapFlow<io.netty.bootstrap.ServerBootstrap>
      Parameters:
      context - The PipelineContext.
    • pipelineCustom

      public void pipelineCustom(PipelineContext context)
      Description copied from interface: MicroBootstrapFlow
      Custom business orchestration (to arrange some business logic for the server).
      Specified by:
      pipelineCustom in interface MicroBootstrapFlow<io.netty.bootstrap.ServerBootstrap>
      Parameters:
      context - The PipelineContext.