P - polling typeR - result typepublic abstract class AbstractPollHandlerBase<P,R> extends java.lang.Object implements PollHandler<P,R>
FutureResult| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Class<P> |
pollClass |
protected java.lang.Class<R> |
resultClass |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractPollHandlerBase(java.lang.Class<P> pollClass,
java.lang.Class<R> resultClass) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Class<P> |
getPollClass()
Get class of the polling object.
|
R |
getResult()
Return result after polling.
|
java.lang.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, handlePollResultprotected final java.lang.Class<P> pollClass
protected final java.lang.Class<R> resultClass
public final java.lang.Class<R> getResultClass()
PollHandlergetResultClass in interface PollHandler<P,R>public final java.lang.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 java.io.IOException
PollHandlerisFinished in interface PollHandler<P,R>response - client side HTTP responsejava.io.IOException - when there's a problem extracting data from responseprotected void onFinish()
Copyright © 2016. All Rights Reserved.