Package com.gooddata.sdk.service
Class AbstractPollHandler<P,R>
java.lang.Object
com.gooddata.sdk.service.AbstractPollHandlerBase<P,R>
com.gooddata.sdk.service.AbstractPollHandler<P,R>
- Type Parameters:
P- polling typeR- result type
- All Implemented Interfaces:
PollHandler<P,R>
- Direct Known Subclasses:
SimplePollHandler
public abstract class AbstractPollHandler<P,R> extends AbstractPollHandlerBase<P,R>
For internal use by services employing polling.
Implementing classes should override AbstractPollHandlerBase.isFinished(ClientHttpResponse) method and
may override AbstractPollHandlerBase.onFinish() and PollHandler.handlePollResult(Object) methods.
- See Also:
FutureResult
-
Field Summary
-
Constructor Summary
Constructors Constructor Description AbstractPollHandler(java.lang.String pollingUri, java.lang.Class<P> pollClass, java.lang.Class<R> resultClass)Creates a new instance of polling handler -
Method Summary
Modifier and Type Method Description java.net.URIgetPolling()Get URI used for polling.java.lang.StringgetPollingUri()Get URI used for polling.protected voidsetPollingUri(java.lang.String pollingUri)Methods inherited from class com.gooddata.sdk.service.AbstractPollHandlerBase
getPollClass, getResult, getResultClass, isDone, isFinished, onFinish, setResultMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.gooddata.sdk.service.PollHandler
handlePollException, handlePollResult
-
Constructor Details
-
AbstractPollHandler
public AbstractPollHandler(java.lang.String pollingUri, java.lang.Class<P> pollClass, java.lang.Class<R> resultClass)Creates a new instance of polling handler- Parameters:
pollingUri- URI for pollingpollClass- class of the polling object (orVoid)resultClass- class of the result (orVoid)
-
-
Method Details
-
getPollingUri
public final java.lang.String getPollingUri()Description copied from interface:PollHandlerGet URI used for polling.- Returns:
- URI string
-
getPolling
public final java.net.URI getPolling()Description copied from interface:PollHandlerGet URI used for polling.- Returns:
- URI string
-
setPollingUri
protected void setPollingUri(java.lang.String pollingUri)
-