Record Class ExternalSetting
java.lang.Object
java.lang.Record
com.iohao.net.external.core.ExternalSetting
- Record Components:
port- port exposed to real playersserver- server metadata descriptoruserSessions- user session manageridleProcessSetting- heartbeat/idle processing settingsoptions- extensible attribute options
- All Implemented Interfaces:
AttrOptionDynamic
public record ExternalSetting(int port, Server server, UserSessions<?,?> userSessions, IdleProcessSetting idleProcessSetting, AttrOptions options)
extends Record
implements AttrOptionDynamic
Immutable runtime settings for one external server instance.
- Since:
- 25.1
- Author:
- 渔民小镇
- date:
- 2025-10-15
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AttrOption<NetServerSetting> Attribute key storing the resolvedNetServerSetting. -
Constructor Summary
ConstructorsConstructorDescriptionExternalSetting(int port, Server server, UserSessions<?, ?> userSessions, IdleProcessSetting idleProcessSetting, AttrOptions options) Creates an instance of aExternalSettingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Get the convenient communication facade from the attached net server setting.final booleanIndicates whether some other object is "equal to" this one.Gets the dynamic member attributes (options)final inthashCode()Returns a hash code value for this object.Returns the value of theidleProcessSettingrecord component.voidInject this setting into supported aware components.Get the net server setting attached to this external setting.options()Returns the value of theoptionsrecord component.intport()Returns the value of theportrecord component.server()Returns the value of theserverrecord component.final StringtoString()Returns a string representation of this record class.UserSessions<?, ?> Returns the value of theuserSessionsrecord component.Methods inherited from interface AttrOptionDynamic
ifNull, ifPresent, option, option, optionValue
-
Field Details
-
netServerSetting
Attribute key storing the resolvedNetServerSetting.
-
-
Constructor Details
-
ExternalSetting
public ExternalSetting(int port, Server server, UserSessions<?, ?> userSessions, IdleProcessSetting idleProcessSetting, AttrOptions options) Creates an instance of aExternalSettingrecord class.- Parameters:
port- the value for theportrecord componentserver- the value for theserverrecord componentuserSessions- the value for theuserSessionsrecord componentidleProcessSetting- the value for theidleProcessSettingrecord componentoptions- the value for theoptionsrecord component
-
-
Method Details
-
netServerSetting
Get the net server setting attached to this external setting.- Returns:
- net server setting, or
nullif not attached
-
convenientCommunication
Get the convenient communication facade from the attached net server setting.- Returns:
- convenient communication facade
-
getOptions
Description copied from interface:AttrOptionDynamicGets the dynamic member attributes (options)- Specified by:
getOptionsin interfaceAttrOptionDynamic- Returns:
- The dynamic member attributes
-
inject
Inject this setting into supported aware components.- Parameters:
o- target component
-
builder
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
port
-
server
-
userSessions
Returns the value of theuserSessionsrecord component.- Returns:
- the value of the
userSessionsrecord component
-
idleProcessSetting
Returns the value of theidleProcessSettingrecord component.- Returns:
- the value of the
idleProcessSettingrecord component
-
options
-