org.codegist.crest.handler
Class MaxAttemptRetryHandler

java.lang.Object
  extended by 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.
 
Constructor Summary
MaxAttemptRetryHandler()
           
MaxAttemptRetryHandler(int max)
           
MaxAttemptRetryHandler(Map<String,Object> customProperties)
           
 
Method Summary
 boolean retry(ResponseContext response, Exception exception, int retryNumber)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MAX

public static final int DEFAULT_MAX
Default retry handler max value used by the empty constructor.

See Also:
Constant Field Values
Constructor Detail

MaxAttemptRetryHandler

public MaxAttemptRetryHandler(int max)

MaxAttemptRetryHandler

public MaxAttemptRetryHandler()

MaxAttemptRetryHandler

public MaxAttemptRetryHandler(Map<String,Object> customProperties)
Method Detail

retry

public boolean retry(ResponseContext response,
                     Exception exception,
                     int retryNumber)
Specified by:
retry in interface RetryHandler


Copyright © 2011. All Rights Reserved.