|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.impl.DefaultUnitOfWork
public class DefaultUnitOfWork
The default implementation of UnitOfWork
Constructor Summary | |
---|---|
DefaultUnitOfWork(Exchange exchange)
|
Method Summary | |
---|---|
void |
addInterceptedNode(ProcessorDefinition node)
Adds the given node that was intercepted |
void |
addSynchronization(Synchronization synchronization)
Adds a synchronization hook |
void |
done(Exchange exchange)
Invoked when this unit of work has been completed, whether it has failed or completed |
String |
getId()
Returns the unique ID of this unit of work, lazily creating one if it does not yet have one |
List<ProcessorDefinition> |
getInterceptedNodes()
Gets the current list of intercepted nodes, representing the route path the current Exchange has taken. |
ProcessorDefinition |
getLastInterceptedNode()
Gets the last intercepted node, is null if no last exists. |
Object |
getOriginalInBody()
Gets the original IN body this Unit of Work was started with. |
void |
handoverSynchronization(Exchange target)
Handover all the registered synchronizations to the target Exchange . |
void |
removeSynchronization(Synchronization synchronization)
Removes a synchronization hook |
void |
start()
Starts the service |
void |
stop()
Stops the service |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultUnitOfWork(Exchange exchange)
Method Detail |
---|
public void start() throws Exception
Service
start
in interface Service
Exception
public void stop() throws Exception
Service
stop
in interface Service
Exception
public void addSynchronization(Synchronization synchronization)
UnitOfWork
addSynchronization
in interface UnitOfWork
synchronization
- the hookpublic void removeSynchronization(Synchronization synchronization)
UnitOfWork
removeSynchronization
in interface UnitOfWork
synchronization
- the hookpublic void handoverSynchronization(Exchange target)
UnitOfWork
Exchange
.
This is used when a route turns into asynchronous and the Exchange
that
is continued and routed in the async thread should do the on completion callbacks instead of the
original synchronous thread.
handoverSynchronization
in interface UnitOfWork
target
- the target exchangepublic void done(Exchange exchange)
UnitOfWork
done
in interface UnitOfWork
exchange
- the current exchangepublic String getId()
UnitOfWork
getId
in interface UnitOfWork
public void addInterceptedNode(ProcessorDefinition node)
TraceableUnitOfWork
addInterceptedNode
in interface TraceableUnitOfWork
node
- the nodepublic ProcessorDefinition getLastInterceptedNode()
TraceableUnitOfWork
getLastInterceptedNode
in interface TraceableUnitOfWork
public List<ProcessorDefinition> getInterceptedNodes()
TraceableUnitOfWork
Exchange
has taken.
getInterceptedNodes
in interface TraceableUnitOfWork
public Object getOriginalInBody()
UnitOfWork
getOriginalInBody
in interface UnitOfWork
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |