public final class PollResult<T> extends Object implements FutureResult<T>
| Constructor and Description |
|---|
PollResult(AbstractService service,
PollHandler<?,T> handler)
Creates a new instance of the result to be eventually retrieved by polling on the REST API.
|
| Modifier and Type | Method and Description |
|---|---|
T |
get()
Wait for the result to be available and return it's value
|
T |
get(long timeout,
TimeUnit unit)
Wait for the result to be available up to given time and return it's value
|
String |
getPollingUri()
Get URI used for polling
|
boolean |
isDone()
Checks if the result is available
|
public PollResult(AbstractService service, PollHandler<?,T> handler)
For internal use by services employing polling.
service - this servicehandler - poll handlerpublic boolean isDone()
FutureResultisDone in interface FutureResult<T>public T get()
FutureResultget in interface FutureResult<T>public T get(long timeout, TimeUnit unit)
FutureResultget in interface FutureResult<T>timeout - timeout valueunit - timeout unitpublic String getPollingUri()
getPollingUri in interface FutureResult<T>Copyright © 2019. All rights reserved.