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 platform-side connect lifecycle through a host-type-specific
HostConnectFlow strategy and emits an ConnectFlow.Outcome per logical
state transition. The strategy owns the endpoint URL + typed response
deserialization; this class owns retry / backoff / state-machine semantics.
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(HostConnectFlow<?> flow, BackoffSchedule backoff, ScheduledExecutorService scheduler, Consumer<ConnectFlow.Outcome> onOutcome) ConnectFlow(HostConnectFlow<?> flow, BackoffSchedule backoff, ScheduledExecutorService scheduler, Consumer<ConnectFlow.Outcome> onOutcome, Consumer<HostConnectFlow<?>> onActiveFlow) -
Method Summary
-
Constructor Details
-
ConnectFlow
public ConnectFlow(HostConnectFlow<?> flow, BackoffSchedule backoff, ScheduledExecutorService scheduler, Consumer<ConnectFlow.Outcome> onOutcome) -
ConnectFlow
public ConnectFlow(HostConnectFlow<?> flow, BackoffSchedule backoff, ScheduledExecutorService scheduler, Consumer<ConnectFlow.Outcome> onOutcome, Consumer<HostConnectFlow<?>> onActiveFlow)
-
-
Method Details