Package com.ultikits.ultitools.websocket
Class CloudPlayerLinks.LinkCreation
java.lang.Object
com.ultikits.ultitools.websocket.CloudPlayerLinks.LinkCreation
- Enclosing class:
CloudPlayerLinks
The answer to one
CloudPlayerLinks.create(com.ultikits.ultitools.abstracts.UltiToolsPlugin, java.util.UUID, java.lang.String, com.ultikits.ultitools.websocket.CloudPlayerLinks.GameAuth, java.util.Set<com.ultikits.ultitools.websocket.CloudPlayerLinks.LinkProof>) call: either a link, or a failure with a safe message.- Since:
- 6.3.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<CloudPlayerLinks.LinkProof> private final Instantprivate final CloudPlayerLinks.Failureprivate final Stringprivate final Stringprivate final String -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateLinkCreation(String linkId, String url, Instant expiresAt, Collection<CloudPlayerLinks.LinkProof> acceptedProofs, CloudPlayerLinks.Failure failure, String message) -
Method Summary
Modifier and TypeMethodDescriptioncreated(String linkId, String url, Instant expiresAt, Collection<CloudPlayerLinks.LinkProof> acceptedProofs) Creates a successful answer.failed(CloudPlayerLinks.Failure failure, String message) Creates a failed answer.failure()linkId()message()toString()url()
-
Field Details
-
linkId
-
url
-
expiresAt
-
acceptedProofs
-
failure
-
message
-
-
Constructor Details
-
LinkCreation
private LinkCreation(String linkId, String url, Instant expiresAt, Collection<CloudPlayerLinks.LinkProof> acceptedProofs, CloudPlayerLinks.Failure failure, String message)
-
-
Method Details
-
created
public static CloudPlayerLinks.LinkCreation created(String linkId, String url, Instant expiresAt, Collection<CloudPlayerLinks.LinkProof> acceptedProofs) Creates a successful answer.- Parameters:
linkId- the id of theplayer.link.createthis link answersurl- the one-time https URL to show the playerexpiresAt- the issue time plus 600 seconds, on the framework's clockacceptedProofs- the proofs the gateway accepted, never empty- Returns:
- the answer
-
failed
public static CloudPlayerLinks.LinkCreation failed(CloudPlayerLinks.Failure failure, String message) Creates a failed answer.- Parameters:
failure- why it failedmessage- a safe diagnostic for the module or operator, never a credential- Returns:
- the answer
-
linkId
- Returns:
- the link id, or null for a failed answer
-
url
- Returns:
- the one-time URL, or null for a failed answer
-
expiresAt
- Returns:
- the expiry on the framework's clock, or null for a failed answer
-
acceptedProofs
- Returns:
- the accepted proofs, empty for a failed answer
-
failure
- Returns:
- why the request failed, or null for a successful answer
-
message
- Returns:
- the safe failure message, or null for a successful answer
-
toString
-