类 BrokerClientBuilder

java.lang.Object
com.iohao.game.bolt.broker.core.client.BrokerClientBuilder

public class BrokerClientBuilder extends Object
Bolt Broker Client (逻辑服)构建器
     see BrokerClient.newBuilder() 创建构建器
 
作者:
渔民小镇
日期:
2022-05-14
  • 方法详细资料

    • addConnectionEventProcessor

      public BrokerClientBuilder addConnectionEventProcessor(com.alipay.remoting.ConnectionEventType type, Supplier<com.alipay.remoting.ConnectionEventProcessor> processorSupplier)
      添加连接器
      参数:
      type - type
      processorSupplier - 连接器
      返回:
      this
    • registerUserProcessor

      public BrokerClientBuilder registerUserProcessor(Supplier<com.alipay.remoting.rpc.protocol.UserProcessor<?>> processorSupplier)
      注册处理器
      参数:
      processorSupplier - 处理器
      返回:
      this
    • removeUserProcessor

      public BrokerClientBuilder removeUserProcessor(Class<? extends com.alipay.remoting.rpc.protocol.UserProcessor<?>> processorClass)
      移除不需要的处理器
      参数:
      processorClass - 处理器
      返回:
      this
    • addListener

      public BrokerClientBuilder addListener(BrokerClientListener listener)
      添加监听
      参数:
      listener - listener
      返回:
      this
    • build

      public BrokerClient build(BrokerAddress brokerAddress)
      构建 BrokerClient
      参数:
      brokerAddress - 连接 broker (游戏网关) 的地址
      返回:
      BrokerClient
    • build

      public BrokerClient build()