CompletableFuture

Methods
4
Fields
None

Getting one

hiscoreClient:lookupAsync(…)

Methods

MethodReturnsDescription
whenComplete((HiscoreResult?, IOException?) -> ())CompletableFutureRun action(result, ex) when the future completes: ex is nil unless it failed. On the client thread at the first invoke point after it…
whenCompleteAsync((HiscoreResult?, IOException?) -> ())CompletableFutureRun action(result, ex) when the future completes, on the client thread at the first invoke point after. An error action raises is logge…
isDone()booleanWhether it has completed, with a result or with an exception.
isCompletedExceptionally()booleanWhether it completed with an exception.

Returned by

MethodReturnsDescription
HiscoreLookup.lookupAsyncCompletableFutureThe lookup, started now, as a future: it completes with the player's result, with nil for a player the hiscores do not list (a 404), or e…

Method details