public class RetryHandler
extends java.lang.Object
Retryable
interface) and executes that with possibility to
retry the execution in case of IOException.Constructor and Description |
---|
RetryHandler(int retriesAllowed,
Task task)
Create a new RetryingHandler.
|
public RetryHandler(int retriesAllowed, Task task)
retriesAllowed
- how many times to retrytask
- the Ant task that is is executed from, used for logging onlypublic void execute(Retryable exe, java.lang.String desc) throws java.io.IOException
Retryable
code with specified number of retries.exe
- the code to executedesc
- some descriptive text for this piece of code, used for loggingjava.io.IOException
- if the number of retries has exceeded the allowed limit