public class PollingHandler extends Object
| Modifier and Type | Method | Description |
|---|---|---|
int |
getInitialDelay() |
Gets the initial delay in seconds used for polling methods.
|
int |
getMaximumCalls() |
Gets the maximum number of sequential calls for a single method.
|
int |
getMaximumDelay() |
Gets the maximum delay in seconds used for polling methods.
|
<T> CompletableFuture<T> |
poll(String href,
Class<T> responseType,
Predicate<T> until) |
Request the given URL until the predicate is satisfied on the response
object.
|
void |
setInitialDelay(int initialDelay) |
Sets the initial delay in seconds used for polling methods.
|
void |
setMaximumCalls(int maximumCalls) |
Sets the maximum number of sequential calls for a single method.
|
void |
setMaximumDelay(int maximumDelay) |
Sets the maximum delay in seconds used for polling methods.
|
public int getInitialDelay()
public void setInitialDelay(int initialDelay)
initialDelay - Initial delay in secondspublic int getMaximumDelay()
public void setMaximumDelay(int maximumDelay)
maximumDelay - Maximum delay in secondspublic int getMaximumCalls()
public void setMaximumCalls(int maximumCalls)
maximumCalls - Maximum number of callspublic <T> CompletableFuture<T> poll(String href, Class<T> responseType, Predicate<T> until)
T - The response typehref - The URLresponseType - Class object of response typeuntil - Predicate to be satisfiedCopyright © 2021. All rights reserved.