类 BrokerServerBuilder
java.lang.Object
com.iohao.game.bolt.broker.server.BrokerServerBuilder
- 所有已实现的接口:
AwareInject
Broker Server (游戏网关服) 构建器
see BrokerServer.newBuilder()
- 作者:
- 渔民小镇
- 日期:
- 2022-05-15
-
方法概要
修饰符和类型方法说明addConnectionEventProcessor
(com.alipay.remoting.ConnectionEventType type, Supplier<com.alipay.remoting.ConnectionEventProcessor> processorSupplier) 注册连接器void
附加能力brokerClusterManagerBuilder
(BrokerClusterManagerBuilder brokerClusterManagerBuilder) 集群构建器build()
构建游戏网关移除所有默认 处理器registerUserProcessor
(Supplier<com.alipay.remoting.rpc.protocol.UserProcessor<?>> processorSupplier) 注册用户处理器removeUserProcessor
(Class<? extends com.alipay.remoting.rpc.protocol.UserProcessor<?>> clazz) 移除用户处理器,使之不与自定义的用户处理器冲突
-
方法详细资料
-
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
- typeprocessorSupplier
- processorSupplier- 返回:
- this
-
brokerClusterManagerBuilder
public BrokerServerBuilder brokerClusterManagerBuilder(BrokerClusterManagerBuilder brokerClusterManagerBuilder) 集群构建器如果不设置,表示不需要集群
- 参数:
brokerClusterManagerBuilder
- brokerClusterManagerBuilder- 返回:
- this
-
clearProcessor
移除所有默认 处理器如果框架满足不了你的业务,你可以把框架默认的处理器移除,这样就可以完全的重新定义
- 返回:
- this
-
aware
从接口复制的说明:AwareInject
附加能力- 指定者:
aware
在接口中AwareInject
- 参数:
obj
- o
-