Package com.ultikits.ultitools.websocket
Interface CloudPlayerLinks.LinkEventHandler
- Enclosing class:
CloudPlayerLinks
public static interface CloudPlayerLinks.LinkEventHandler
Receives completions and expiries of this server's links.
Methods run on a framework worker thread, never on the primary thread. The framework calls
onCompleted(com.ultikits.ultitools.websocket.CloudPlayerLinks.LinkCompletion) for every completion whose result it has not recorded yet, including ones
redelivered after a restart; the result must be persisted by the framework before the gateway
is told, so a module never needs its own persistence. Answering with a future that never
completes, or that fails, sends no result, and the gateway asks again later.
- Since:
- 6.3.1
-
Method Summary
Modifier and TypeMethodDescriptiononCompleted(CloudPlayerLinks.LinkCompletion completion) Provisions (or declines to provision) a game account for a completed link.default voidonExpired(CloudPlayerLinks.LinkExpiry expiry) Notifies that a link stopped being usable.
-
Method Details
-
onCompleted
CompletableFuture<CloudPlayerLinks.GameAccountResult> onCompleted(CloudPlayerLinks.LinkCompletion completion) Provisions (or declines to provision) a game account for a completed link.- Parameters:
completion- what the gateway reported- Returns:
- a future that completes with what the module did, never null
-
onExpired
Notifies that a link stopped being usable. No reply is sent for an expiry, and the framework sends no synthetic expiry for a link whose expiry time simply passed.- Parameters:
expiry- the link and the reason
-