Package org.apache.camel.builder
Class LegacyDefaultErrorHandlerBuilder
java.lang.Object
org.apache.camel.builder.LegacyErrorHandlerBuilderSupport
org.apache.camel.builder.LegacyDefaultErrorHandlerBuilder
- All Implemented Interfaces:
LegacyErrorHandlerBuilder,org.apache.camel.ErrorHandlerFactory,DefaultErrorHandlerProperties
- Direct Known Subclasses:
LegacyDeadLetterChannelBuilder
@Deprecated
public class LegacyDefaultErrorHandlerBuilder
extends LegacyErrorHandlerBuilderSupport
implements DefaultErrorHandlerProperties
Deprecated.
Legacy error handler for XML DSL in camel-spring-xml/camel-blueprint
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallowRedeliveryWhileStopping(boolean allowRedeliveryWhileStopping) Deprecated.Controls whether to allow redelivery while stopping/shutting down a route that uses error handling.Deprecated.Will allow asynchronous delayed redeliveries.backOffMultiplier(double backOffMultiplier) Deprecated.Deprecated.protected voidDeprecated.collisionAvoidancePercent(double collisionAvoidancePercent) Deprecated.protected org.apache.camel.spi.CamelLoggerDeprecated.protected org.apache.camel.processor.errorhandler.RedeliveryPolicyDeprecated.deadLetterHandleNewException(boolean handleNewException) Deprecated.Whether the dead letter channel should handle (and ignore) any new exception that may been thrown during sending the message to the dead letter endpoint.delayPattern(String delayPattern) Deprecated.Deprecated.exchangeFormatterRef(String exchangeFormatterRef) Deprecated.executorService(ScheduledExecutorService executorService) Deprecated.Sets the thread pool to be used for redelivery.executorServiceRef(String ref) Deprecated.Sets a reference to a thread pool to be used for redelivery.Deprecated.org.apache.camel.processor.errorhandler.RedeliveryPolicyDeprecated.Deprecated.Deprecated.org.apache.camel.spi.CamelLoggerDeprecated.org.apache.camel.ProcessorDeprecated.Deprecated.org.apache.camel.ProcessorDeprecated.Deprecated.org.apache.camel.ProcessorDeprecated.Deprecated.org.apache.camel.processor.errorhandler.RedeliveryPolicyDeprecated.org.apache.camel.PredicateDeprecated.org.apache.camel.PredicategetRetryWhilePolicy(org.apache.camel.CamelContext context) Deprecated.Deprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.Deprecated.Sets the log used for caught exceptionsDeprecated.Sets the log used for caught exceptionslog(org.slf4j.Logger log) Deprecated.Sets the log used for caught exceptionslogExhausted(boolean logExhausted) Deprecated.logExhaustedMessageBody(boolean logExhaustedMessageBody) Deprecated.logExhaustedMessageHistory(boolean logExhaustedMessageHistory) Deprecated.logger(org.apache.camel.spi.CamelLogger logger) Deprecated.Sets the logger used for caught exceptionsloggingLevel(org.apache.camel.LoggingLevel level) Deprecated.Sets the logging level of exceptions caughtlogHandled(boolean logHandled) Deprecated.logNewException(boolean logNewException) Deprecated.logRetryAttempted(boolean logRetryAttempted) Deprecated.logRetryStackTrace(boolean logRetryStackTrace) Deprecated.logStackTrace(boolean logStackTrace) Deprecated.maximumRedeliveries(int maximumRedeliveries) Deprecated.maximumRedeliveryDelay(long maximumRedeliveryDelay) Deprecated.onExceptionOccurred(org.apache.camel.Processor processor) Deprecated.Sets a customProcessorto process theExchangejust after an exception was thrown.onExceptionOccurredRef(String onExceptionOccurredRef) Deprecated.Sets a reference for the processor to use just after an exception was thrown.onPrepareFailure(org.apache.camel.Processor processor) Deprecated.Sets a customProcessorto prepare theExchangebefore handled by the failure processor / dead letter channel.onPrepareFailureRef(String onPrepareFailureRef) Deprecated.Sets a reference for the processor to use before handled by the failure processor.onRedelivery(org.apache.camel.Processor processor) Deprecated.Sets a processor that should be processed before a redelivery attempt.onRedeliveryRef(String onRedeliveryRef) Deprecated.Sets a reference for the processor to use before a redelivery attempt.redeliveryDelay(long delay) Deprecated.retriesExhaustedLogLevel(org.apache.camel.LoggingLevel retriesExhaustedLogLevel) Deprecated.retryAttemptedLogInterval(int retryAttemptedLogInterval) Deprecated.retryAttemptedLogLevel(org.apache.camel.LoggingLevel retryAttemptedLogLevel) Deprecated.retryWhile(org.apache.camel.Expression retryWhile) Deprecated.Sets the retry while expression.retryWhileRef(String retryWhileRef) Deprecated.voidsetAsyncDelayedRedelivery(boolean asyncDelayedRedelivery) Deprecated.voidsetDeadLetterHandleNewException(boolean deadLetterHandleNewException) Deprecated.voidsetDeadLetterUri(String deadLetterUri) Deprecated.voidsetExecutorService(ScheduledExecutorService executorService) Deprecated.voidsetExecutorServiceRef(String executorServiceRef) Deprecated.voidsetLogger(org.apache.camel.spi.CamelLogger logger) Deprecated.voidsetOnExceptionOccurred(org.apache.camel.Processor onExceptionOccurred) Deprecated.voidsetOnExceptionOccurredRef(String onExceptionOccurredRef) Deprecated.voidsetOnPrepareFailure(org.apache.camel.Processor onPrepareFailure) Deprecated.voidsetOnPrepareFailureRef(String onPrepareFailureRef) Deprecated.voidsetOnRedelivery(org.apache.camel.Processor onRedelivery) Deprecated.voidsetOnRedeliveryRef(String onRedeliveryRef) Deprecated.voidsetRedeliveryPolicy(org.apache.camel.processor.errorhandler.RedeliveryPolicy redeliveryPolicy) Deprecated.Sets the redelivery policyvoidsetRetryWhile(org.apache.camel.Predicate retryWhile) Deprecated.voidsetRetryWhileRef(String retryWhileRef) Deprecated.voidsetUseOriginalBody(boolean useOriginalBody) Deprecated.voidsetUseOriginalMessage(boolean useOriginalMessage) Deprecated.booleanDeprecated.toString()Deprecated.Deprecated.Deprecated.Deprecated.Will use the original inputMessagebody (original body only) when anExchangeis moved to the dead letter queue.Deprecated.Will use the original inputMessage(original body and headers) when anExchangeis moved to the dead letter queue.
-
Constructor Details
-
LegacyDefaultErrorHandlerBuilder
public LegacyDefaultErrorHandlerBuilder()Deprecated.
-
-
Method Details
-
supportTransacted
public boolean supportTransacted()Deprecated.- Specified by:
supportTransactedin interfaceorg.apache.camel.ErrorHandlerFactory- Overrides:
supportTransactedin classLegacyErrorHandlerBuilderSupport
-
cloneBuilder
Deprecated.- Specified by:
cloneBuilderin interfaceorg.apache.camel.ErrorHandlerFactory
-
cloneBuilder
Deprecated. -
backOffMultiplier
Deprecated. -
collisionAvoidancePercent
Deprecated. -
redeliveryDelay
Deprecated. -
delayPattern
Deprecated. -
maximumRedeliveries
Deprecated. -
disableRedelivery
Deprecated. -
maximumRedeliveryDelay
Deprecated. -
useCollisionAvoidance
Deprecated. -
useExponentialBackOff
Deprecated. -
retriesExhaustedLogLevel
public LegacyDefaultErrorHandlerBuilder retriesExhaustedLogLevel(org.apache.camel.LoggingLevel retriesExhaustedLogLevel) Deprecated. -
retryAttemptedLogLevel
public LegacyDefaultErrorHandlerBuilder retryAttemptedLogLevel(org.apache.camel.LoggingLevel retryAttemptedLogLevel) Deprecated. -
retryAttemptedLogInterval
Deprecated. -
logStackTrace
Deprecated. -
logRetryStackTrace
Deprecated. -
logHandled
Deprecated. -
logNewException
Deprecated. -
logExhausted
Deprecated. -
logRetryAttempted
Deprecated. -
logExhaustedMessageHistory
public LegacyDefaultErrorHandlerBuilder logExhaustedMessageHistory(boolean logExhaustedMessageHistory) Deprecated. -
logExhaustedMessageBody
Deprecated. -
exchangeFormatterRef
Deprecated. -
asyncDelayedRedelivery
Deprecated.Will allow asynchronous delayed redeliveries. The route, in particular the consumer's component, must support the Asynchronous Routing Engine (e.g. seda)- Returns:
- the builder
- See Also:
-
RedeliveryPolicy.setAsyncDelayedRedelivery(boolean)
-
allowRedeliveryWhileStopping
public LegacyDefaultErrorHandlerBuilder allowRedeliveryWhileStopping(boolean allowRedeliveryWhileStopping) Deprecated.Controls whether to allow redelivery while stopping/shutting down a route that uses error handling.- Parameters:
allowRedeliveryWhileStopping- true to allow redelivery, false to reject redeliveries- Returns:
- the builder
-
executorService
Deprecated.Sets the thread pool to be used for redelivery.- Parameters:
executorService- the scheduled thread pool to use- Returns:
- the builder.
-
executorServiceRef
Deprecated.Sets a reference to a thread pool to be used for redelivery.- Parameters:
ref- reference to a scheduled thread pool- Returns:
- the builder.
-
logger
Deprecated.Sets the logger used for caught exceptions- Parameters:
logger- the logger- Returns:
- the builder
-
loggingLevel
Deprecated.Sets the logging level of exceptions caught- Parameters:
level- the logging level- Returns:
- the builder
-
log
Deprecated.Sets the log used for caught exceptions- Parameters:
log- the logger- Returns:
- the builder
-
log
Deprecated.Sets the log used for caught exceptions- Parameters:
log- the log name- Returns:
- the builder
-
log
Deprecated.Sets the log used for caught exceptions- Parameters:
log- the log class- Returns:
- the builder
-
onRedelivery
Deprecated.Sets a processor that should be processed before a redelivery attempt. Can be used to change theExchangebefore its being redelivered.- Parameters:
processor- the processor- Returns:
- the builder
-
onRedeliveryRef
Deprecated.Sets a reference for the processor to use before a redelivery attempt.- Parameters:
onRedeliveryRef- the processor's reference- Returns:
- the builder
- See Also:
-
retryWhile
Deprecated.Sets the retry while expression. Will continue retrying until expression evaluates to false.- Parameters:
retryWhile- expression that determines when to stop retrying- Returns:
- the builder
-
retryWhileRef
Deprecated. -
useOriginalMessage
Deprecated.Will use the original inputMessage(original body and headers) when anExchangeis moved to the dead letter queue. Notice: this only applies when all redeliveries attempt have failed and theExchangeis doomed for failure.
Instead of using the current inprogressExchangeIN message we use the original IN message instead. This allows you to store the original input in the dead letter queue instead of the inprogress snapshot of the IN message. For instance if you route transform the IN body during routing and then failed. With the original exchange store in the dead letter queue it might be easier to manually re submit theExchangeagain as the IN message is the same as when Camel received it. So you should be able to send theExchangeto the same input. The difference between useOriginalMessage and useOriginalBody is that the former includes both the original body and headers, where as the latter only includes the original body. You can use the latter to enrich the message with custom headers and include the original message body. The former wont let you do this, as its using the original message body and headers as they are. You cannot enable both useOriginalMessage and useOriginalBody. The original input message is defensively copied, and the copied message body is converted toStreamCacheif possible, to ensure the body can be read when the original message is being used later. If the body is not converted toStreamCachethen the body will not be able to re-read when accessed later. Important: The original input means the input message that are bounded by the currentUnitOfWork. An unit of work typically spans one route, or multiple routes if they are connected using internal endpoints such as direct or seda. When messages is passed via external endpoints such as JMS or HTTP then the consumer will create a new unit of work, with the message it received as input as the original input. Also some EIP patterns such as splitter, multicast, will create a new unit of work boundary for the messages in their sub-route (eg the split message); however these EIPs have an option named shareUnitOfWork which allows to combine with the parent unit of work in regard to error handling and therefore use the parent original message. By default this feature is off.- Returns:
- the builder
- See Also:
-
useOriginalBody
Deprecated.Will use the original inputMessagebody (original body only) when anExchangeis moved to the dead letter queue. Notice: this only applies when all redeliveries attempt have failed and theExchangeis doomed for failure.
Instead of using the current inprogressExchangeIN message we use the original IN message instead. This allows you to store the original input in the dead letter queue instead of the inprogress snapshot of the IN message. For instance if you route transform the IN body during routing and then failed. With the original exchange store in the dead letter queue it might be easier to manually re submit theExchangeagain as the IN message is the same as when Camel received it. So you should be able to send theExchangeto the same input. The difference between useOriginalMessage and useOriginalBody is that the former includes both the original body and headers, where as the latter only includes the original body. You can use the latter to enrich the message with custom headers and include the original message body. The former wont let you do this, as its using the original message body and headers as they are. You cannot enable both useOriginalMessage and useOriginalBody. The original input message is defensively copied, and the copied message body is converted toStreamCacheif possible, to ensure the body can be read when the original message is being used later. If the body is not converted toStreamCachethen the body will not be able to re-read when accessed later. Important: The original input means the input message that are bounded by the currentUnitOfWork. An unit of work typically spans one route, or multiple routes if they are connected using internal endpoints such as direct or seda. When messages is passed via external endpoints such as JMS or HTTP then the consumer will create a new unit of work, with the message it received as input as the original input. Also some EIP patterns such as splitter, multicast, will create a new unit of work boundary for the messages in their sub-route (eg the split message); however these EIPs have an option named shareUnitOfWork which allows to combine with the parent unit of work in regard to error handling and therefore use the parent original message. By default this feature is off.- Returns:
- the builder
- See Also:
-
deadLetterHandleNewException
Deprecated.Whether the dead letter channel should handle (and ignore) any new exception that may been thrown during sending the message to the dead letter endpoint. The default value is true which means any such kind of exception is handled and ignored. Set this to false to let the exception be propagated back on theExchange. This can be used in situations where you use transactions, and want to use Camel's dead letter channel to deal with exceptions during routing, but if the dead letter channel itself fails because of a new exception being thrown, then by setting this to false the new exceptions is propagated back and set on theExchange, which allows the transaction to detect the exception, and rollback.- Parameters:
handleNewException- true to handle (and ignore), false to catch and propagated the exception on theExchange- Returns:
- the builder
-
onPrepareFailure
Deprecated.Sets a customProcessorto prepare theExchangebefore handled by the failure processor / dead letter channel. This allows for example to enrich the message before sending to a dead letter queue.- Parameters:
processor- the processor- Returns:
- the builder
-
onPrepareFailureRef
Deprecated.Sets a reference for the processor to use before handled by the failure processor.- Parameters:
onPrepareFailureRef- the processor's reference- Returns:
- the builder
- See Also:
-
onExceptionOccurred
Deprecated.Sets a customProcessorto process theExchangejust after an exception was thrown. This allows to execute the processor at the same time the exception was thrown. Important: Any exception thrown from this processor will be ignored.- Parameters:
processor- the processor- Returns:
- the builder
-
onExceptionOccurredRef
Deprecated.Sets a reference for the processor to use just after an exception was thrown.- Parameters:
onExceptionOccurredRef- the processor's reference- Returns:
- the builder
- See Also:
-
hasRedeliveryPolicy
public boolean hasRedeliveryPolicy()Deprecated.- Specified by:
hasRedeliveryPolicyin interfaceDefaultErrorHandlerProperties
-
getDefaultRedeliveryPolicy
public org.apache.camel.processor.errorhandler.RedeliveryPolicy getDefaultRedeliveryPolicy()Deprecated.- Specified by:
getDefaultRedeliveryPolicyin interfaceDefaultErrorHandlerProperties
-
getRedeliveryPolicy
public org.apache.camel.processor.errorhandler.RedeliveryPolicy getRedeliveryPolicy()Deprecated.- Specified by:
getRedeliveryPolicyin interfaceDefaultErrorHandlerProperties
-
setRedeliveryPolicy
public void setRedeliveryPolicy(org.apache.camel.processor.errorhandler.RedeliveryPolicy redeliveryPolicy) Deprecated.Sets the redelivery policy- Specified by:
setRedeliveryPolicyin interfaceDefaultErrorHandlerProperties
-
hasLogger
public boolean hasLogger()Deprecated.- Specified by:
hasLoggerin interfaceDefaultErrorHandlerProperties
-
getLogger
public org.apache.camel.spi.CamelLogger getLogger()Deprecated.- Specified by:
getLoggerin interfaceDefaultErrorHandlerProperties
-
setLogger
public void setLogger(org.apache.camel.spi.CamelLogger logger) Deprecated.- Specified by:
setLoggerin interfaceDefaultErrorHandlerProperties
-
getOnRedelivery
public org.apache.camel.Processor getOnRedelivery()Deprecated.- Specified by:
getOnRedeliveryin interfaceDefaultErrorHandlerProperties
-
setOnRedelivery
public void setOnRedelivery(org.apache.camel.Processor onRedelivery) Deprecated.- Specified by:
setOnRedeliveryin interfaceDefaultErrorHandlerProperties
-
getOnRedeliveryRef
Deprecated.- Specified by:
getOnRedeliveryRefin interfaceDefaultErrorHandlerProperties
-
setOnRedeliveryRef
Deprecated.- Specified by:
setOnRedeliveryRefin interfaceDefaultErrorHandlerProperties
-
getRetryWhilePolicy
public org.apache.camel.Predicate getRetryWhilePolicy(org.apache.camel.CamelContext context) Deprecated. -
getRetryWhile
public org.apache.camel.Predicate getRetryWhile()Deprecated.- Specified by:
getRetryWhilein interfaceDefaultErrorHandlerProperties
-
setRetryWhile
public void setRetryWhile(org.apache.camel.Predicate retryWhile) Deprecated.- Specified by:
setRetryWhilein interfaceDefaultErrorHandlerProperties
-
getRetryWhileRef
Deprecated.- Specified by:
getRetryWhileRefin interfaceDefaultErrorHandlerProperties
-
setRetryWhileRef
Deprecated.- Specified by:
setRetryWhileRefin interfaceDefaultErrorHandlerProperties
-
getDeadLetterUri
Deprecated.- Specified by:
getDeadLetterUriin interfaceDefaultErrorHandlerProperties
-
setDeadLetterUri
Deprecated.- Specified by:
setDeadLetterUriin interfaceDefaultErrorHandlerProperties
-
isDeadLetterHandleNewException
public boolean isDeadLetterHandleNewException()Deprecated.- Specified by:
isDeadLetterHandleNewExceptionin interfaceDefaultErrorHandlerProperties
-
setDeadLetterHandleNewException
public void setDeadLetterHandleNewException(boolean deadLetterHandleNewException) Deprecated.- Specified by:
setDeadLetterHandleNewExceptionin interfaceDefaultErrorHandlerProperties
-
isUseOriginalMessage
public boolean isUseOriginalMessage()Deprecated.- Specified by:
isUseOriginalMessagein interfaceDefaultErrorHandlerProperties
-
setUseOriginalMessage
public void setUseOriginalMessage(boolean useOriginalMessage) Deprecated.- Specified by:
setUseOriginalMessagein interfaceDefaultErrorHandlerProperties
-
isUseOriginalBody
public boolean isUseOriginalBody()Deprecated.- Specified by:
isUseOriginalBodyin interfaceDefaultErrorHandlerProperties
-
setUseOriginalBody
public void setUseOriginalBody(boolean useOriginalBody) Deprecated.- Specified by:
setUseOriginalBodyin interfaceDefaultErrorHandlerProperties
-
isAsyncDelayedRedelivery
public boolean isAsyncDelayedRedelivery()Deprecated.- Specified by:
isAsyncDelayedRedeliveryin interfaceDefaultErrorHandlerProperties
-
setAsyncDelayedRedelivery
public void setAsyncDelayedRedelivery(boolean asyncDelayedRedelivery) Deprecated.- Specified by:
setAsyncDelayedRedeliveryin interfaceDefaultErrorHandlerProperties
-
getExecutorService
Deprecated.- Specified by:
getExecutorServicein interfaceDefaultErrorHandlerProperties
-
setExecutorService
Deprecated.- Specified by:
setExecutorServicein interfaceDefaultErrorHandlerProperties
-
getExecutorServiceRef
Deprecated.- Specified by:
getExecutorServiceRefin interfaceDefaultErrorHandlerProperties
-
setExecutorServiceRef
Deprecated.- Specified by:
setExecutorServiceRefin interfaceDefaultErrorHandlerProperties
-
getOnPrepareFailure
public org.apache.camel.Processor getOnPrepareFailure()Deprecated.- Specified by:
getOnPrepareFailurein interfaceDefaultErrorHandlerProperties
-
setOnPrepareFailure
public void setOnPrepareFailure(org.apache.camel.Processor onPrepareFailure) Deprecated.- Specified by:
setOnPrepareFailurein interfaceDefaultErrorHandlerProperties
-
getOnPrepareFailureRef
Deprecated.- Specified by:
getOnPrepareFailureRefin interfaceDefaultErrorHandlerProperties
-
setOnPrepareFailureRef
Deprecated.- Specified by:
setOnPrepareFailureRefin interfaceDefaultErrorHandlerProperties
-
getOnExceptionOccurred
public org.apache.camel.Processor getOnExceptionOccurred()Deprecated.- Specified by:
getOnExceptionOccurredin interfaceDefaultErrorHandlerProperties
-
setOnExceptionOccurred
public void setOnExceptionOccurred(org.apache.camel.Processor onExceptionOccurred) Deprecated.- Specified by:
setOnExceptionOccurredin interfaceDefaultErrorHandlerProperties
-
getOnExceptionOccurredRef
Deprecated.- Specified by:
getOnExceptionOccurredRefin interfaceDefaultErrorHandlerProperties
-
setOnExceptionOccurredRef
Deprecated.- Specified by:
setOnExceptionOccurredRefin interfaceDefaultErrorHandlerProperties
-
createRedeliveryPolicy
protected org.apache.camel.processor.errorhandler.RedeliveryPolicy createRedeliveryPolicy()Deprecated. -
createLogger
protected org.apache.camel.spi.CamelLogger createLogger()Deprecated. -
toString
Deprecated.
-