Class DefaultErrorHandler
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.ChildServiceSupport
org.apache.camel.processor.errorhandler.ErrorHandlerSupport
org.apache.camel.processor.errorhandler.RedeliveryErrorHandler
org.apache.camel.processor.errorhandler.DefaultErrorHandler
- All Implemented Interfaces:
AutoCloseable
,org.apache.camel.AsyncProcessor
,org.apache.camel.Navigate<org.apache.camel.Processor>
,org.apache.camel.Processor
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,org.apache.camel.spi.ErrorHandler
,org.apache.camel.spi.ErrorHandlerRedeliveryCustomizer
,org.apache.camel.spi.ShutdownPrepared
,org.apache.camel.StatefulService
,org.apache.camel.SuspendableService
Default error handler
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.camel.processor.errorhandler.RedeliveryErrorHandler
RedeliveryErrorHandler.RedeliveryTask, RedeliveryErrorHandler.SimpleTask
-
Field Summary
Fields inherited from class org.apache.camel.processor.errorhandler.RedeliveryErrorHandler
awaitManager, camelContext, customExchangeFormatter, deadLetter, deadLetterHandleNewException, deadLetterUri, exchangeFormatter, executorService, logger, onExceptionProcessor, onPrepareProcessor, output, outputAsync, preparingShutdown, reactiveExecutor, redeliveryEnabled, redeliveryPolicy, redeliveryProcessor, redeliverySleepCounter, retryWhilePolicy, shutdownStrategy, simpleTask, taskFactory, useOriginalBodyPolicy, useOriginalMessagePolicy
Fields inherited from class org.apache.camel.processor.errorhandler.ErrorHandlerSupport
DEFAULT_EXCHANGE_FORMATTER, exceptionPolicies, exceptionPolicy
Fields inherited from class org.apache.camel.support.ChildServiceSupport
childServices
Fields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING
-
Constructor Summary
ConstructorDescriptionDefaultErrorHandler
(org.apache.camel.CamelContext camelContext, org.apache.camel.Processor output, org.apache.camel.spi.CamelLogger logger, org.apache.camel.Processor redeliveryProcessor, RedeliveryPolicy redeliveryPolicy, org.apache.camel.Predicate retryWhile, ScheduledExecutorService executorService, org.apache.camel.Processor onPrepareProcessor, org.apache.camel.Processor onExceptionOccurredProcessor) Creates the default error handler. -
Method Summary
Methods inherited from class org.apache.camel.processor.errorhandler.RedeliveryErrorHandler
changeOutput, defensiveCopyExchangeIfNeeded, determineIfRedeliveryIsEnabled, determineRedeliveryDelay, doShutdown, doStart, doStop, getDeadLetter, getDeadLetterUri, getDefaultHandledPredicate, getLogger, getOutput, getRedeliveryPolicy, hasNext, isDeadLetterHandleNewException, isDone, isRunAllowedOnPreparingShutdown, isUseOriginalBodyPolicy, isUseOriginalMessagePolicy, next, prepareShutdown, process, process, processAsync, supportTransacted
Methods inherited from class org.apache.camel.processor.errorhandler.ErrorHandlerSupport
addErrorHandler, addExceptionPolicy, getExceptionPolicy, isDeadLetterChannel
Methods inherited from class org.apache.camel.support.ChildServiceSupport
addChildService, removeChildService, shutdown, start, stop
Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, suspend
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.camel.Service
build, close, init
Methods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending
Methods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
DefaultErrorHandler
public DefaultErrorHandler(org.apache.camel.CamelContext camelContext, org.apache.camel.Processor output, org.apache.camel.spi.CamelLogger logger, org.apache.camel.Processor redeliveryProcessor, RedeliveryPolicy redeliveryPolicy, org.apache.camel.Predicate retryWhile, ScheduledExecutorService executorService, org.apache.camel.Processor onPrepareProcessor, org.apache.camel.Processor onExceptionOccurredProcessor) Creates the default error handler.- Parameters:
camelContext
- the camel contextoutput
- outer processor that should use this default error handlerlogger
- logger to use for logging failures and redelivery attemptsredeliveryProcessor
- an optional processor to run before redelivery attemptredeliveryPolicy
- policy for redeliveryretryWhile
- retry whileexecutorService
- theScheduledExecutorService
to be used for redelivery thread pool. Can be null.onPrepareProcessor
- a customProcessor
to prepare theExchange
before handled by the failure processor / dead letter channel.onExceptionOccurredProcessor
- a customProcessor
to process theExchange
just after an exception was thrown.
-
-
Method Details
-
clone
public org.apache.camel.spi.ErrorHandler clone(org.apache.camel.Processor output) Description copied from class:ErrorHandlerSupport
Clones the current error handler and changes the output- Specified by:
clone
in classErrorHandlerSupport
-
toString
-