Package app.l2nx.gs.adapter.core
Enum Class AdapterState
- All Implemented Interfaces:
Serializable,Comparable<AdapterState>,Constable
Lifecycle states observable via
NxAdapter.state() / NxAdapter.onStateChange(java.util.function.Consumer<app.l2nx.gs.adapter.core.AdapterState>).
Transitions are atomic; observers see each state at most once per logical
transition. Terminal states (FAILED, REJECTED, CLOSED)
never re-enter the connect / heartbeat loop.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionConnected, heartbeat running.Terminal — JVM shutdown hook fired orNxAdapter.shutdown()called.Transient failure (5xx / 409 / network) — retry scheduled.Adapter is loaded butl2nx.enabled=false— no work performed.Terminal failure due to config error or 401 (invalid server-key).Initial state beforeNxAdapter.start()runs.Connect attempt in flight (first attempt, or any retry).Terminal — server deactivated by tenant (403 GAME_SERVER_DEACTIVATED). -
Method Summary
Modifier and TypeMethodDescriptionstatic AdapterStateReturns the enum constant of this class with the specified name.static AdapterState[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INIT
Initial state beforeNxAdapter.start()runs. -
REGISTERING
Connect attempt in flight (first attempt, or any retry). -
ACTIVE
Connected, heartbeat running. -
DEGRADED
Transient failure (5xx / 409 / network) — retry scheduled. -
FAILED
Terminal failure due to config error or 401 (invalid server-key). -
REJECTED
Terminal — server deactivated by tenant (403 GAME_SERVER_DEACTIVATED). -
DISABLED
Adapter is loaded butl2nx.enabled=false— no work performed. -
CLOSED
Terminal — JVM shutdown hook fired orNxAdapter.shutdown()called.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-