org.codegist.crest.handler
Class MaxAttemptRetryHandler
java.lang.Object
org.codegist.crest.handler.MaxAttemptRetryHandler
- All Implemented Interfaces:
- RetryHandler
public class MaxAttemptRetryHandler
- extends Object
- implements RetryHandler
Default retry handler always returns true is the given attempt is strictly less than given max value.
Defaults configuration always return false. This behavior can be changed
- Author:
- Laurent Gilles (laurent.gilles@codegist.org)
Field Summary |
static int |
DEFAULT_MAX
Default retry handler max value used by the empty constructor. |
DEFAULT_MAX
public static final int DEFAULT_MAX
- Default retry handler max value used by the empty constructor.
- See Also:
- Constant Field Values
MaxAttemptRetryHandler
public MaxAttemptRetryHandler(int max)
MaxAttemptRetryHandler
public MaxAttemptRetryHandler()
MaxAttemptRetryHandler
public MaxAttemptRetryHandler(Map<String,Object> customProperties)
retry
public boolean retry(ResponseContext response,
Exception exception,
int retryNumber)
- Specified by:
retry
in interface RetryHandler
Copyright © 2011. All Rights Reserved.