org.mule.retry.policies
Class SimpleRetryPolicy

java.lang.Object
  extended by org.mule.retry.policies.SimpleRetryPolicy
All Implemented Interfaces:
RetryPolicy

public class SimpleRetryPolicy
extends Object
implements RetryPolicy

Allows to configure how many times a retry should be attempted and how long to wait between retries.


Nested Class Summary
protected static class SimpleRetryPolicy.RetryCounter
           
 
Field Summary
protected static Log logger
           
protected  SimpleRetryPolicy.RetryCounter retryCounter
           
 
Constructor Summary
SimpleRetryPolicy(long frequency, int retryCount)
           
 
Method Summary
 PolicyStatus applyPolicy(Throwable cause)
           
protected  boolean isApplicableTo(Throwable cause)
          Indicates if the policy is applicable for the cause that caused the policy invocation.
protected  boolean isExhausted()
          Determines if the policy is exhausted or not comparing the original configuration against the current state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final Log logger

retryCounter

protected SimpleRetryPolicy.RetryCounter retryCounter
Constructor Detail

SimpleRetryPolicy

public SimpleRetryPolicy(long frequency,
                         int retryCount)
Method Detail

applyPolicy

public PolicyStatus applyPolicy(Throwable cause)
Specified by:
applyPolicy in interface RetryPolicy

isApplicableTo

protected boolean isApplicableTo(Throwable cause)
Indicates if the policy is applicable for the cause that caused the policy invocation. Subclasses can override this method in order to filter the type of exceptions that does not deserve a retry.

Returns:
true if the policy is applicable, false otherwise.

isExhausted

protected boolean isExhausted()
Determines if the policy is exhausted or not comparing the original configuration against the current state.



Copyright © 2003-2014 MuleSoft, Inc.. All Rights Reserved.