Package app.l2nx.gs.adapter.core.connect
Class ConnectFlow
java.lang.Object
app.l2nx.gs.adapter.core.connect.ConnectFlow
- All Implemented Interfaces:
Runnable
Drives the
POST /api/tenants/servers/connect lifecycle and emits an
ConnectFlow.Outcome per logical state transition. Status-code dispatch:
200→ConnectFlow.Outcome.ACTIVE401→ConnectFlow.Outcome.FAILED(terminal, no retry)403+code=GAME_SERVER_DEACTIVATED→ConnectFlow.Outcome.REJECTED(terminal, no retry)409+code=KAFKA_CREDENTIALS_MISSING→ConnectFlow.Outcome.TRANSIENT(retry viaBackoffSchedule)5xx/IOException→ConnectFlow.Outcome.TRANSIENT(retry viaBackoffSchedule)- any other status →
ConnectFlow.Outcome.FAILED(treated as terminal so we don't hammer the platform on an unexpected response shape)
ConnectFlow.Outcome.STARTING is emitted at the top of every run (initial submit
and every retry) so the orchestrator can drive the REGISTERING transition.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumCoarse-grained connect-flow events surfaced to the orchestrator (NxAdapter). -
Constructor Summary
ConstructorsConstructorDescriptionConnectFlow(AdapterConfig config, ConnectClient client, BackoffSchedule backoff, ScheduledExecutorService scheduler, Consumer<ConnectFlow.Outcome> onOutcome) ConnectFlow(AdapterConfig config, ConnectClient client, BackoffSchedule backoff, ScheduledExecutorService scheduler, Consumer<ConnectFlow.Outcome> onOutcome, Consumer<app.l2nx.gs.adapter.api.rest.ConnectResponse> onActiveResponse) -
Method Summary
-
Constructor Details
-
ConnectFlow
public ConnectFlow(AdapterConfig config, ConnectClient client, BackoffSchedule backoff, ScheduledExecutorService scheduler, Consumer<ConnectFlow.Outcome> onOutcome) -
ConnectFlow
public ConnectFlow(AdapterConfig config, ConnectClient client, BackoffSchedule backoff, ScheduledExecutorService scheduler, Consumer<ConnectFlow.Outcome> onOutcome, Consumer<app.l2nx.gs.adapter.api.rest.ConnectResponse> onActiveResponse)
-
-
Method Details