Search in sources :

Example 6 with RedeliveryErrorHandler

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

the class ManagedErrorHandler method setRetryAttemptedLogLevel.

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

Example 7 with RedeliveryErrorHandler

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

the class ManagedErrorHandler method setLogExhaustedMessageBody.

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

Example 8 with RedeliveryErrorHandler

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

the class ManagedErrorHandler method setLogExhaustedMessageHistory.

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

Example 9 with RedeliveryErrorHandler

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

the class ManagedErrorHandler method setAllowRedeliveryWhileStopping.

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

Example 10 with RedeliveryErrorHandler

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

the class ManagedErrorHandler method setCollisionAvoidanceFactor.

public void setCollisionAvoidanceFactor(Double factor) {
    if (!isSupportRedelivery()) {
        throw new IllegalArgumentException("This error handler does not support redelivery");
    }
    RedeliveryErrorHandler redelivery = (RedeliveryErrorHandler) errorHandler;
    redelivery.getRedeliveryPolicy().setCollisionAvoidanceFactor(factor);
}
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