Package com.gooddata

Class PollResult<T>

  • All Implemented Interfaces:
    FutureResult<T>

    public final class PollResult<T>
    extends Object
    implements FutureResult<T>
    Represents the result retrieved by polling on the REST API.
    • Constructor Detail

      • PollResult

        public PollResult​(AbstractService service,
                          PollHandler<?,​T> handler)
        Creates a new instance of the result to be eventually retrieved by polling on the REST API.

        For internal use by services employing polling.

        Parameters:
        service - this service
        handler - poll handler
    • Method Detail

      • isDone

        public boolean isDone()
        Description copied from interface: FutureResult
        Checks if the result is available
        Specified by:
        isDone in interface FutureResult<T>
        Returns:
        true if so
      • get

        public T get()
        Description copied from interface: FutureResult
        Wait for the result to be available and return it's value
        Specified by:
        get in interface FutureResult<T>
        Returns:
        result value
      • get

        public T get​(long timeout,
                     TimeUnit unit)
        Description copied from interface: FutureResult
        Wait for the result to be available up to given time and return it's value
        Specified by:
        get in interface FutureResult<T>
        Parameters:
        timeout - timeout value
        unit - timeout unit
        Returns:
        result value