Search in sources :

Example 16 with RedeliveryErrorHandler

use of org.apache.camel.processor.RedeliveryErrorHandler in project camel by apache.

the class ManagedErrorHandler method setMaximumRedeliveryDelay.

public void setMaximumRedeliveryDelay(Long delay) {
    if (!isSupportRedelivery()) {
        throw new IllegalArgumentException("This error handler does not support redelivery");
    }
    RedeliveryErrorHandler redelivery = (RedeliveryErrorHandler) errorHandler;
    redelivery.getRedeliveryPolicy().setMaximumRedeliveryDelay(delay);
}
Also used : RedeliveryErrorHandler(org.apache.camel.processor.RedeliveryErrorHandler)

Example 17 with RedeliveryErrorHandler

use of org.apache.camel.processor.RedeliveryErrorHandler in project camel by apache.

the class ManagedErrorHandler method setLogExhausted.

public void setLogExhausted(Boolean log) {
    if (!isSupportRedelivery()) {
        throw new IllegalArgumentException("This error handler does not support redelivery");
    }
    RedeliveryErrorHandler redelivery = (RedeliveryErrorHandler) errorHandler;
    redelivery.getRedeliveryPolicy().setLogExhausted(log);
}
Also used : RedeliveryErrorHandler(org.apache.camel.processor.RedeliveryErrorHandler)

Example 18 with RedeliveryErrorHandler

use of org.apache.camel.processor.RedeliveryErrorHandler in project camel by apache.

the class ManagedErrorHandler method setRedeliveryDelay.

public void setRedeliveryDelay(Long delay) {
    if (!isSupportRedelivery()) {
        throw new IllegalArgumentException("This error handler does not support redelivery");
    }
    RedeliveryErrorHandler redelivery = (RedeliveryErrorHandler) errorHandler;
    redelivery.getRedeliveryPolicy().setRedeliveryDelay(delay);
}
Also used : RedeliveryErrorHandler(org.apache.camel.processor.RedeliveryErrorHandler)

Example 19 with RedeliveryErrorHandler

use of org.apache.camel.processor.RedeliveryErrorHandler in project camel by apache.

the class ManagedErrorHandler method setLogNewException.

public void setLogNewException(Boolean log) {
    if (!isSupportRedelivery()) {
        throw new IllegalArgumentException("This error handler does not support redelivery");
    }
    RedeliveryErrorHandler redelivery = (RedeliveryErrorHandler) errorHandler;
    redelivery.getRedeliveryPolicy().setLogNewException(log);
}
Also used : RedeliveryErrorHandler(org.apache.camel.processor.RedeliveryErrorHandler)

Example 20 with RedeliveryErrorHandler

use of org.apache.camel.processor.RedeliveryErrorHandler in project camel by apache.

the class ManagedErrorHandler method setDelayPattern.

public void setDelayPattern(String pattern) {
    if (!isSupportRedelivery()) {
        throw new IllegalArgumentException("This error handler does not support redelivery");
    }
    RedeliveryErrorHandler redelivery = (RedeliveryErrorHandler) errorHandler;
    redelivery.getRedeliveryPolicy().setDelayPattern(pattern);
}
Also used : RedeliveryErrorHandler(org.apache.camel.processor.RedeliveryErrorHandler)

Aggregations

RedeliveryErrorHandler (org.apache.camel.processor.RedeliveryErrorHandler)21 OnExceptionDefinition (org.apache.camel.model.OnExceptionDefinition)1 ErrorHandlerSupport (org.apache.camel.processor.ErrorHandlerSupport)1