|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UnitOfWork
An object representing the unit of work processing an Exchange
which allows the use of Synchronization
hooks. This object might map one-to-one with
a transaction in JPA or Spring; or might not.
Method Summary | |
---|---|
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 |
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 |
Method Detail |
---|
void addSynchronization(Synchronization synchronization)
synchronization
- the hookvoid removeSynchronization(Synchronization synchronization)
synchronization
- the hookvoid handoverSynchronization(Exchange target)
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.
target
- the target exchangevoid done(Exchange exchange)
exchange
- the current exchangeString getId()
Object getOriginalInBody()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |