类 BrokerServerBuilder

java.lang.Object
com.iohao.game.bolt.broker.server.BrokerServerBuilder
所有已实现的接口:
AwareInject

public class BrokerServerBuilder extends Object implements AwareInject
Broker Server (游戏网关服) 构建器
     see BrokerServer.newBuilder()
 
作者:
渔民小镇
日期:
2022-05-15
  • 方法详细资料

    • build

      public BrokerServer build()
      构建游戏网关
      返回:
      游戏网关
    • registerUserProcessor

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

      public BrokerServerBuilder removeUserProcessor(Class<? extends com.alipay.remoting.rpc.protocol.UserProcessor<?>> clazz)
      移除用户处理器,使之不与自定义的用户处理器冲突
      参数:
      clazz - 待移除的用户处理器类型
      返回:
      this
    • addConnectionEventProcessor

      public BrokerServerBuilder addConnectionEventProcessor(com.alipay.remoting.ConnectionEventType type, Supplier<com.alipay.remoting.ConnectionEventProcessor> processorSupplier)
      注册连接器
      参数:
      type - type
      processorSupplier - processorSupplier
      返回:
      this
    • brokerClusterManagerBuilder

      public BrokerServerBuilder brokerClusterManagerBuilder(BrokerClusterManagerBuilder brokerClusterManagerBuilder)
      集群构建器
           如果不设置,表示不需要集群
       
      参数:
      brokerClusterManagerBuilder - brokerClusterManagerBuilder
      返回:
      this
    • clearProcessor

      public BrokerServerBuilder clearProcessor()
      移除所有默认 处理器
           如果框架满足不了你的业务,你可以把框架默认的处理器移除,这样就可以完全的重新定义
       
      返回:
      this
    • aware

      public void aware(Object obj)
      从接口复制的说明: AwareInject
      附加能力
      指定者:
      aware 在接口中 AwareInject
      参数:
      obj - o