Search in sources :

Example 1 with AsynchronousRetryTemplate

use of org.mule.runtime.core.api.retry.async.AsynchronousRetryTemplate in project mule by mulesoft.

the class RetryPolicyTemplateObjectFactory method doGetObject.

@Override
public RetryPolicyTemplate doGetObject() throws Exception {
    SimpleRetryPolicyTemplate retryPolicyTemplate = new SimpleRetryPolicyTemplate(frequency, count);
    retryPolicyTemplate.setNotificationFirer(notificationFirer);
    if (retryNotifier != null) {
        retryPolicyTemplate.setNotifier(retryNotifier);
    }
    if (!blocking) {
        return new AsynchronousRetryTemplate(retryPolicyTemplate);
    }
    return retryPolicyTemplate;
}
Also used : SimpleRetryPolicyTemplate(org.mule.runtime.core.api.retry.policy.SimpleRetryPolicyTemplate) AsynchronousRetryTemplate(org.mule.runtime.core.api.retry.async.AsynchronousRetryTemplate)

Aggregations

AsynchronousRetryTemplate (org.mule.runtime.core.api.retry.async.AsynchronousRetryTemplate)1 SimpleRetryPolicyTemplate (org.mule.runtime.core.api.retry.policy.SimpleRetryPolicyTemplate)1