public final class FutureResult<T> extends Object
| Constructor and Description |
|---|
FutureResult(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 FutureResult(AbstractService service, PollHandler<?,T> handler)
For internal use by services employing polling.
service - this servicehandler - poll handlerpublic boolean isDone()
GoodDataException - when polling fails or the thread was interruptedpublic T get()
GoodDataException - when polling fails or the thread was interruptedpublic T get(long timeout, TimeUnit unit)
timeout - timeout valueunit - timeout unitGoodDataException - when polling fails, the timeout expires or the thread was interruptedpublic String getPollingUri()
Copyright © 2014. All Rights Reserved.