Package org.apache.camel.impl.engine
Class MDCUnitOfWork
java.lang.Object
org.apache.camel.impl.engine.DefaultUnitOfWork
org.apache.camel.impl.engine.MDCUnitOfWork
- All Implemented Interfaces:
AutoCloseable
,org.apache.camel.Service
,org.apache.camel.spi.UnitOfWork
This unit of work supports MDC.
-
Field Summary
Fields inherited from interface org.apache.camel.spi.UnitOfWork
MDC_BREADCRUMB_ID, MDC_CAMEL_CONTEXT_ID, MDC_CORRELATION_ID, MDC_EXCHANGE_ID, MDC_MESSAGE_ID, MDC_ROUTE_ID, MDC_STEP_ID, MDC_TRANSACTION_KEY
-
Constructor Summary
ConstructorsConstructorDescriptionMDCUnitOfWork
(org.apache.camel.Exchange exchange, org.apache.camel.spi.InflightRepository inflightRepository, String pattern, boolean allowUseOriginalMessage, boolean useBreadcrumb) -
Method Summary
Modifier and TypeMethodDescriptionvoid
afterProcess
(org.apache.camel.Processor processor, org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback, boolean doneSync) org.apache.camel.AsyncCallback
beforeProcess
(org.apache.camel.Processor processor, org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback) void
beginTransactedBy
(Object key) void
clear()
Clears information put on the MDC by thisMDCUnitOfWork
void
done
(org.apache.camel.Exchange exchange) void
endTransactedBy
(Object key) boolean
org.apache.camel.spi.UnitOfWork
newInstance
(org.apache.camel.Exchange exchange) protected void
onDone()
org.apache.camel.Route
popRoute()
protected void
prepareMDC
(org.apache.camel.Exchange exchange) void
pushRoute
(org.apache.camel.Route route) void
reset()
void
start()
void
stop()
toString()
Methods inherited from class org.apache.camel.impl.engine.DefaultUnitOfWork
addSynchronization, afterRoute, beforeRoute, containsSynchronization, createChildUnitOfWork, getOriginalInMessage, getRoute, handoverSynchronization, handoverSynchronization, isTransacted, isTransactedBy, onPrepare, removeSynchronization, routeStackLevel, setParentUnitOfWork
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
-
Constructor Details
-
MDCUnitOfWork
public MDCUnitOfWork(org.apache.camel.Exchange exchange, org.apache.camel.spi.InflightRepository inflightRepository, String pattern, boolean allowUseOriginalMessage, boolean useBreadcrumb)
-
-
Method Details
-
prepareMDC
protected void prepareMDC(org.apache.camel.Exchange exchange) -
newInstance
public org.apache.camel.spi.UnitOfWork newInstance(org.apache.camel.Exchange exchange) -
pushRoute
public void pushRoute(org.apache.camel.Route route) - Specified by:
pushRoute
in interfaceorg.apache.camel.spi.UnitOfWork
- Overrides:
pushRoute
in classDefaultUnitOfWork
-
popRoute
public org.apache.camel.Route popRoute()- Specified by:
popRoute
in interfaceorg.apache.camel.spi.UnitOfWork
- Overrides:
popRoute
in classDefaultUnitOfWork
-
beginTransactedBy
- Specified by:
beginTransactedBy
in interfaceorg.apache.camel.spi.UnitOfWork
- Overrides:
beginTransactedBy
in classDefaultUnitOfWork
-
endTransactedBy
- Specified by:
endTransactedBy
in interfaceorg.apache.camel.spi.UnitOfWork
- Overrides:
endTransactedBy
in classDefaultUnitOfWork
-
isBeforeAfterProcess
public boolean isBeforeAfterProcess()- Specified by:
isBeforeAfterProcess
in interfaceorg.apache.camel.spi.UnitOfWork
- Overrides:
isBeforeAfterProcess
in classDefaultUnitOfWork
-
beforeProcess
public org.apache.camel.AsyncCallback beforeProcess(org.apache.camel.Processor processor, org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback) - Specified by:
beforeProcess
in interfaceorg.apache.camel.spi.UnitOfWork
- Overrides:
beforeProcess
in classDefaultUnitOfWork
-
afterProcess
public void afterProcess(org.apache.camel.Processor processor, org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback, boolean doneSync) - Specified by:
afterProcess
in interfaceorg.apache.camel.spi.UnitOfWork
- Overrides:
afterProcess
in classDefaultUnitOfWork
-
clear
public void clear()Clears information put on the MDC by thisMDCUnitOfWork
-
done
public void done(org.apache.camel.Exchange exchange) - Specified by:
done
in interfaceorg.apache.camel.spi.UnitOfWork
- Overrides:
done
in classDefaultUnitOfWork
-
onDone
protected void onDone()- Overrides:
onDone
in classDefaultUnitOfWork
-
reset
public void reset()- Specified by:
reset
in interfaceorg.apache.camel.spi.UnitOfWork
- Overrides:
reset
in classDefaultUnitOfWork
-
start
public void start()- Specified by:
start
in interfaceorg.apache.camel.Service
-
stop
public void stop()- Specified by:
stop
in interfaceorg.apache.camel.Service
-
toString
- Overrides:
toString
in classDefaultUnitOfWork
-