Package org.cloudburstmc.netty.signaling
Class ProviderClient
java.lang.Object
org.cloudburstmc.netty.signaling.ProviderClient
- All Implemented Interfaces:
AutoCloseable
One asynchronous, serialized control lifecycle per backend, never one poller per player.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classWhat the client registers and runs with.static final recordSampled actual players on this runtime; keep counting existing players while not accepting new ones.static enumstatic enumThe game's verdict on an admitted player.static final recordCapacity and connectedPlayers describe the same observation.static final recordWhere the operator says the host runs: a country, coordinates or both.static final recordA link the provider offers the host's operator.static final classstatic final recordThe assigned runtime identity.static final recordThe host software and its version, as the provider should show them. -
Constructor Summary
ConstructorsConstructorDescriptionProviderClient(ProviderClient.Configuration config, ProviderStateStore store, ProviderTransport transport, Supplier<ServerStatus> statusSupplier, Supplier<ProviderClient.Health> healthSupplier, Consumer<ProviderDiagnostic> diagnostics) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()drain()CompletableFuture<com.google.gson.JsonObject>extensionRequest(String namespace, String operation, String method, com.google.gson.JsonObject body) Explicit application request to an advertised extension operation, never automatic execution.CompletableFuture<com.google.gson.JsonObject>Opaque registration metadata; the application decides what it means.Carrier of the last successful signed operation, independent of advertised configuration.The provider's current link for the host's operator, requesting a fresh one when a heartbeat said it is offered.CompletableFuture<com.google.gson.JsonObject>Refresh through the ordinary heartbeat and return its readiness observation.booleanreportGameOutcome(String ticketId, ProviderClient.GameOutcome outcome, String reason) Queues a game outcome for an admitted ticket without blocking.voidWake local observation on join/leave/reload; unchanged snapshots never create network traffic.start()stop()updateHeartbeatExtensions(com.google.gson.JsonObject extensions) Replace optional application observations and promptly send them when running.
-
Constructor Details
-
ProviderClient
public ProviderClient(ProviderClient.Configuration config, ProviderStateStore store, ProviderTransport transport, Supplier<ServerStatus> statusSupplier, Supplier<ProviderClient.Health> healthSupplier, Consumer<ProviderDiagnostic> diagnostics)
-
-
Method Details
-
lastControlCarrier
Carrier of the last successful signed operation, independent of advertised configuration. -
start
-
requestStatusRefresh
public void requestStatusRefresh()Wake local observation on join/leave/reload; unchanged snapshots never create network traffic. -
readiness
Refresh through the ordinary heartbeat and return its readiness observation. -
updateHeartbeatExtensions
Replace optional application observations and promptly send them when running. An omitted extension is not an application-level instruction to clear an earlier observation. -
reportGameOutcome
public boolean reportGameOutcome(String ticketId, ProviderClient.GameOutcome outcome, String reason) Queues a game outcome for an admitted ticket without blocking. RequiresProviderClient.Configuration.Builder.gameOutcomes.- Parameters:
ticketId- The ticket ID from the authenticated admission carrierreason- A code of at most 128 characters, or null; never player identity or disconnect text- Returns:
- false when the client is stopping or the queue is full, so the outcome was dropped
-
operatorAction
The provider's current link for the host's operator, requesting a fresh one when a heartbeat said it is offered. -
extensions
Opaque registration metadata; the application decides what it means. -
extensionRequest
public CompletableFuture<com.google.gson.JsonObject> extensionRequest(String namespace, String operation, String method, com.google.gson.JsonObject body) Explicit application request to an advertised extension operation, never automatic execution. -
deregister
-
rotateAdmissionKey
-
rotateMachineKey
-
drain
-
stop
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-