Class ProviderClient

java.lang.Object
org.cloudburstmc.netty.signaling.ProviderClient
All Implemented Interfaces:
AutoCloseable

public final class ProviderClient extends Object implements AutoCloseable
One asynchronous, serialized control lifecycle per backend, never one poller per player.
  • Constructor Details

  • Method Details

    • lastControlCarrier

      public String lastControlCarrier()
      Carrier of the last successful signed operation, independent of advertised configuration.
    • publishedEndpoints

      public Optional<ProviderClient.PublishedEndpoints> publishedEndpoints()
      The endpoints the provider last acknowledged to hand joining players. Safe to call from any thread, and never waits for a heartbeat.
      Returns:
      The last acknowledged endpoints, empty before the first acknowledgement, while a changed profile is being published again, and once stopping
    • start

    • requestStatusRefresh

      public void requestStatusRefresh()
      Wake local observation on join/leave/reload; unchanged snapshots never create network traffic.
    • readiness

      public CompletableFuture<com.google.gson.JsonObject> readiness()
      Refresh through the ordinary heartbeat and return its readiness observation.
    • updateHeartbeatExtensions

      public CompletableFuture<Void> updateHeartbeatExtensions(com.google.gson.JsonObject extensions)
      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. Requires ProviderClient.Configuration.Builder.gameOutcomes.
      Parameters:
      ticketId - The ticket ID from the authenticated admission carrier
      reason - 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

      public CompletableFuture<com.google.gson.JsonObject> 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

      public CompletableFuture<Void> deregister()
    • rotateAdmissionKey

      public CompletableFuture<ProviderClient.Registration> rotateAdmissionKey()
    • rotateMachineKey

      public CompletableFuture<ProviderClient.Registration> rotateMachineKey()
    • drain

      public CompletableFuture<Void> drain()
    • stop

      public CompletionStage<Void> stop()
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable