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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
get()
Wait for the result to be available and return it's valueT
get(long timeout, java.util.concurrent.TimeUnit unit)
Wait for the result to be available up to given time and return it's valuejava.lang.String
getPollingUri()
Get URI used for pollingboolean
isDone()
Checks if the result is available
-
-
-
Method Detail
-
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
T get(long timeout, java.util.concurrent.TimeUnit unit)
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
-
-