Class ExternalServerBuilder
java.lang.Object
com.iohao.net.external.core.ExternalServerBuilder
- All Implemented Interfaces:
AttrOptionDynamic, ExternalServerBuilderSetting
Builder for assembling an external server and its runtime dependencies.
- Since:
- 25.1
- Author:
- 渔民小镇
- date:
- 2023-02-19
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build anExternalServerwith defaults, transport-specific settings, and injected dependencies.intgetId()externalServerIdHeartbeat-related settingsConnection method: defaults to WebsocketGet the micro bootstrap instance.The startup process for the server that connects with real playersGets the dynamic member attributes (options)intgetPort()UserHook hook interface, triggered on login and logoutUserSessions<?, ?> User (player) session managervoidsetExternalServerCreator(ExternalServerCreator externalServerCreator) voidsetId(int id) externalServerIdvoidsetIdleProcessSettingBuilder(IdleProcessSettingBuilder idleProcessSettingBuilder) Heartbeat-related settingsvoidsetJoinEnum(ExternalJoinEnum joinEnum) Connection method: defaults to WebsocketvoidsetMicroBootstrap(MicroBootstrap microBootstrap) Set the micro bootstrap instance.voidsetMicroBootstrapFlow(MicroBootstrapFlow<?> microBootstrapFlow) The startup process for the server that connects with real playersvoidsetPort(int port) voidsetUserHook(UserHook userHook) UserHook hook interface, triggered on login and logoutvoidsetUserSessions(UserSessions<?, ?> userSessions) User (player) session managerMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface AttrOptionDynamic
ifNull, ifPresent, option, option, optionValue
-
Constructor Details
-
ExternalServerBuilder
public ExternalServerBuilder()
-
-
Method Details
-
build
Build anExternalServerwith defaults, transport-specific settings, and injected dependencies.- Returns:
- configured external server instance
-
getOptions
Description copied from interface:AttrOptionDynamicGets the dynamic member attributes (options)- Specified by:
getOptionsin interfaceAttrOptionDynamic- Returns:
- The dynamic member attributes
-
getId
public int getId()externalServerId -
getPort
public int getPort() -
getJoinEnum
Connection method: defaults to Websocket -
getMicroBootstrapFlow
The startup process for the server that connects with real players- Specified by:
getMicroBootstrapFlowin interfaceExternalServerBuilderSetting- Returns:
- micro bootstrap flow
-
getIdleProcessSettingBuilder
Heartbeat-related settings- Specified by:
getIdleProcessSettingBuilderin interfaceExternalServerBuilderSetting- Returns:
- idle process setting builder
-
getUserSessions
User (player) session manager- Specified by:
getUserSessionsin interfaceExternalServerBuilderSetting- Returns:
- user session manager
-
getUserHook
UserHook hook interface, triggered on login and logout -
getMicroBootstrap
Description copied from interface:ExternalServerBuilderSettingGet the micro bootstrap instance.- Specified by:
getMicroBootstrapin interfaceExternalServerBuilderSetting- Returns:
- micro bootstrap
-
getExternalServerCreator
-
setId
public void setId(int id) externalServerId -
setPort
public void setPort(int port) -
setJoinEnum
Connection method: defaults to Websocket -
setMicroBootstrapFlow
The startup process for the server that connects with real players- Specified by:
setMicroBootstrapFlowin interfaceExternalServerBuilderSetting- Parameters:
microBootstrapFlow- micro bootstrap flow
-
setIdleProcessSettingBuilder
Heartbeat-related settings -
setUserSessions
User (player) session manager- Specified by:
setUserSessionsin interfaceExternalServerBuilderSetting- Parameters:
userSessions- user session manager
-
setUserHook
UserHook hook interface, triggered on login and logout -
setMicroBootstrap
Description copied from interface:ExternalServerBuilderSettingSet the micro bootstrap instance.- Specified by:
setMicroBootstrapin interfaceExternalServerBuilderSetting- Parameters:
microBootstrap- micro bootstrap
-
setExternalServerCreator
-