Package com.gooddata

Interface PollHandler<P,​R>

    • Method Detail

      • getPollingUri

        String getPollingUri()
        Get URI used for polling.
        Returns:
        URI string
      • getPolling

        default URI getPolling()
        Get URI used for polling.
        Returns:
        URI string
      • getResultClass

        Class<R> getResultClass()
        Get class of result after polling.
        Returns:
        result class
      • getPollClass

        Class<P> getPollClass()
        Get class of the polling object.
        Returns:
        polling class
      • isDone

        boolean isDone()
        Returns true when the polling is done, false otherwise.
        Returns:
        true when the polling is done, false otherwise
      • getResult

        R getResult()
        Return result after polling.
        Returns:
        result after polling
      • isFinished

        boolean isFinished​(org.springframework.http.client.ClientHttpResponse response)
                    throws IOException
        Check single polling response if whole polling process should finish.
        Parameters:
        response - client side HTTP response
        Returns:
        true if polling should finish, false otherwise
        Throws:
        IOException - when there's a problem extracting data from response
      • handlePollResult

        void handlePollResult​(P pollResult)
        Handle result of single polling request.
        Parameters:
        pollResult - result of polling request
      • handlePollException

        void handlePollException​(com.gooddata.GoodDataRestException e)
        Handle exception while polling. The implementing class should throw instance of GoodDataException (or ancestor) with the given argument as cause.
        Parameters:
        e - the exception