P - polling typeR - result typepublic abstract class AbstractPollHandlerBase<P,R> extends Object implements PollHandler<P,R>
FutureResult| Modifier and Type | Field and Description |
|---|---|
protected Class<P> |
pollClass |
protected Class<R> |
resultClass |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractPollHandlerBase(Class<P> pollClass,
Class<R> resultClass) |
| Modifier and Type | Method and Description |
|---|---|
Class<P> |
getPollClass()
Get class of the polling object.
|
R |
getResult()
Return result after polling.
|
Class<R> |
getResultClass()
Get class of result after polling.
|
boolean |
isDone()
Returns true when the polling is done, false otherwise.
|
boolean |
isFinished(org.springframework.http.client.ClientHttpResponse response)
Check single polling response if whole polling process should finish.
|
protected void |
onFinish()
Method called after polling is successfully finished (default no-op)
|
protected PollHandler<P,R> |
setResult(R result) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPollingUri, handlePollException, handlePollResultpublic final Class<R> getResultClass()
PollHandlergetResultClass in interface PollHandler<P,R>public final Class<P> getPollClass()
PollHandlergetPollClass in interface PollHandler<P,R>protected PollHandler<P,R> setResult(R result)
public final boolean isDone()
PollHandlerisDone in interface PollHandler<P,R>public final R getResult()
PollHandlergetResult in interface PollHandler<P,R>public boolean isFinished(org.springframework.http.client.ClientHttpResponse response)
throws IOException
PollHandlerisFinished in interface PollHandler<P,R>response - client side HTTP responseIOException - when there's a problem extracting data from responseprotected void onFinish()
Copyright © 2017. All Rights Reserved.