Package app.l2nx.gs.adapter.core.connect
Interface HostConnectFlow<R>
- Type Parameters:
R- wire response type returned by the host-type endpoint
- All Known Implementing Classes:
GameServerConnectFlow,LoginServerConnectFlow
public interface HostConnectFlow<R>
Host-type-aware handshake strategy. Performs one POST against the
platform's host-type connect endpoint, captures the deserialized response,
and exposes uniform accessors so adapter wiring (Kafka client bootstrap,
heartbeat, module
ConnectContext) is host-type-agnostic.
Two implementations ship with adapter-core:
GameServerConnectFlow—POST /api/tenants/gameservers/connect, response typeConnectResponse.LoginServerConnectFlow—POST /api/tenants/loginservers/connect, response typeLoginServerConnectResponse.
Single-attempt strategy — retry / backoff / scheduler concerns belong
to ConnectFlow. The field accessors return null before a
successful connect(); after success they project the captured
response.
Internal to adapter-core — not an SPI. Public visibility is
required only because NxAdapter (sibling package) consumes the
type. External code MUST NOT implement this interface; new abstract
methods will be added without deprecation cycles when new host-types or
accessor fields land.
-
Method Summary
Modifier and TypeMethodDescriptionconnect()Execute one handshake attempt against the platform.The path underplatformUrlthis flow POSTs to — exposed for test introspection and logging.@Nullable StringHeartbeat Kafka topic from the captured response.@Nullable app.l2nx.gs.adapter.api.rest.KafkaCredentialskafka()Kafka client bootstrap credentials from the captured response.@Nullable Rresponse()Captured response from the last successfulconnect().@Nullable UUIDserverId()@Nullable String@Nullable String@Nullable app.l2nx.gs.adapter.api.rest.SyncTopicsSync-stream topic bundle (db / runtime / datapack).@Nullable UUIDtenantId()@Nullable String@Nullable app.l2nx.gs.adapter.api.rest.MessagingTopicstopics()Messaging topic bundle (events + commands) from the captured response.
-
Method Details
-
connect
TypedConnectOutcome<R> connect()Execute one handshake attempt against the platform. The returnedTypedConnectOutcomewraps either the parsed response or a transport / HTTP error — never throws into the caller. -
connectPath
String connectPath()The path underplatformUrlthis flow POSTs to — exposed for test introspection and logging. -
response
@Nullable R response()Captured response from the last successfulconnect(). Returnsnullbefore the first successful call. -
heartbeatTopic
@Nullable String heartbeatTopic()Heartbeat Kafka topic from the captured response. -
topics
@Nullable app.l2nx.gs.adapter.api.rest.MessagingTopics topics()Messaging topic bundle (events + commands) from the captured response. -
syncTopics
@Nullable app.l2nx.gs.adapter.api.rest.SyncTopics syncTopics()Sync-stream topic bundle (db / runtime / datapack). Alwaysnullfor login-server host-type — LS deployments carry no sync streams. -
serverId
@Nullable UUID serverId() -
tenantId
@Nullable UUID tenantId() -
tenantSlug
@Nullable String tenantSlug() -
serverSlug
@Nullable String serverSlug() -
serverName
@Nullable String serverName() -
kafka
@Nullable app.l2nx.gs.adapter.api.rest.KafkaCredentials kafka()Kafka client bootstrap credentials from the captured response. Namedkafka()rather thankafkaCredentials()to match the field accessor naming on the underlying response DTOs.
-