public class TransactionErrorHandler
extends org.apache.camel.processor.errorhandler.ErrorHandlerSupport
implements org.apache.camel.AsyncProcessor, org.apache.camel.spi.ShutdownPrepared, org.apache.camel.Navigate<org.apache.camel.Processor>
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.camel.CamelContext |
camelContext |
protected org.apache.camel.Processor |
output |
protected boolean |
preparingShutdown |
| Constructor and Description |
|---|
TransactionErrorHandler(org.apache.camel.CamelContext camelContext,
org.apache.camel.Processor output,
JtaTransactionPolicy transactionPolicy,
org.apache.camel.LoggingLevel rollbackLoggingLevel)
Creates the transaction error handler.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.camel.spi.ErrorHandler |
clone(org.apache.camel.Processor output) |
protected void |
doInTransactionTemplate(org.apache.camel.Exchange exchange) |
protected void |
doShutdown() |
protected void |
doStart() |
protected void |
doStop() |
org.apache.camel.Processor |
getOutput() |
boolean |
hasNext() |
List<org.apache.camel.Processor> |
next() |
void |
prepareShutdown(boolean suspendOnly,
boolean forced) |
void |
process(org.apache.camel.Exchange exchange) |
boolean |
process(org.apache.camel.Exchange exchange,
org.apache.camel.AsyncCallback callback) |
CompletableFuture<org.apache.camel.Exchange> |
processAsync(org.apache.camel.Exchange exchange) |
protected void |
processByErrorHandler(org.apache.camel.Exchange exchange)
Processes the
Exchange using the error handler. |
protected void |
processInTransaction(org.apache.camel.Exchange exchange) |
void |
setTransactionPolicy(JtaTransactionPolicy transactionPolicy) |
boolean |
supportTransacted() |
addErrorHandler, addExceptionPolicy, getExceptionPolicy, isDeadLetterChanneladdChildService, removeChildService, shutdown, start, stopbuild, doBuild, doFail, doInit, doLifecycleChange, doResume, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, suspendclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprotected final org.apache.camel.CamelContext camelContext
protected final org.apache.camel.Processor output
protected volatile boolean preparingShutdown
public TransactionErrorHandler(org.apache.camel.CamelContext camelContext,
org.apache.camel.Processor output,
JtaTransactionPolicy transactionPolicy,
org.apache.camel.LoggingLevel rollbackLoggingLevel)
camelContext - the camel contextoutput - outer processor that should use this default error handlertransactionPolicy - the transaction policyrollbackLoggingLevel - logging level to use for logging transaction rollback occurredpublic org.apache.camel.spi.ErrorHandler clone(org.apache.camel.Processor output)
clone in class org.apache.camel.processor.errorhandler.ErrorHandlerSupportpublic void process(org.apache.camel.Exchange exchange)
throws Exception
process in interface org.apache.camel.ProcessorExceptionpublic boolean process(org.apache.camel.Exchange exchange,
org.apache.camel.AsyncCallback callback)
process in interface org.apache.camel.AsyncProcessorpublic CompletableFuture<org.apache.camel.Exchange> processAsync(org.apache.camel.Exchange exchange)
processAsync in interface org.apache.camel.AsyncProcessorprotected void processInTransaction(org.apache.camel.Exchange exchange)
public void setTransactionPolicy(JtaTransactionPolicy transactionPolicy)
protected void doInTransactionTemplate(org.apache.camel.Exchange exchange)
throws Throwable
Throwableprotected void processByErrorHandler(org.apache.camel.Exchange exchange)
Exchange using the error handler.
This implementation will invoke ensure this occurs synchronously, that means if the async routing engine did kick
in, then this implementation will wait for the task to complete before it continues.exchange - the exchangepublic org.apache.camel.Processor getOutput()
getOutput in class org.apache.camel.processor.errorhandler.ErrorHandlerSupportprotected void doStart()
throws Exception
doStart in class org.apache.camel.support.service.BaseServiceExceptionprotected void doStop()
throws Exception
doStop in class org.apache.camel.support.service.BaseServiceExceptionprotected void doShutdown()
throws Exception
doShutdown in class org.apache.camel.support.service.BaseServiceExceptionpublic boolean supportTransacted()
supportTransacted in class org.apache.camel.processor.errorhandler.ErrorHandlerSupportpublic boolean hasNext()
hasNext in interface org.apache.camel.Navigate<org.apache.camel.Processor>public List<org.apache.camel.Processor> next()
next in interface org.apache.camel.Navigate<org.apache.camel.Processor>public void prepareShutdown(boolean suspendOnly,
boolean forced)
prepareShutdown in interface org.apache.camel.spi.ShutdownPreparedApache Camel