Package com.gooddata.sdk.service
Interface FutureResult<T>
- All Known Implementing Classes:
PollResult
public interface FutureResult<T>
Represents the result retrieved by polling on the REST API.
-
Method Summary
Modifier and Type Method Description Tget()Wait for the result to be available and return it's valueTget(long timeout, java.util.concurrent.TimeUnit unit)Wait for the result to be available up to given time and return it's valuejava.lang.StringgetPollingUri()Get URI used for pollingbooleanisDone()Checks if the result is available
-
Method Details
-
isDone
boolean isDone()Checks if the result is available- Returns:
- true if so
- Throws:
com.gooddata.sdk.common.GoodDataException- when polling fails or the thread was interrupted
-
get
T get()Wait for the result to be available and return it's value- Returns:
- result value
- Throws:
com.gooddata.sdk.common.GoodDataException- when polling fails or the thread was interrupted
-
get
Wait for the result to be available up to given time and return it's value- Parameters:
timeout- timeout valueunit- timeout unit- Returns:
- result value
- Throws:
com.gooddata.sdk.common.GoodDataException- when polling fails, the timeout expires or the thread was interrupted
-
getPollingUri
java.lang.String getPollingUri()Get URI used for polling- Returns:
- URI string
-