org.apache.camel.spi
Interface UnitOfWork

All Known Implementing Classes:
DefaultUnitOfWork

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.

Version:
$Revision: 669650 $

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
 void removeSynchronization(Synchronization synchronization)
          Removes a synchronization hook
 

Method Detail

addSynchronization

void addSynchronization(Synchronization synchronization)
Adds a synchronization hook

Parameters:
synchronization -

removeSynchronization

void removeSynchronization(Synchronization synchronization)
Removes a synchronization hook

Parameters:
synchronization -

done

void done(Exchange exchange)
Invoked when this unit of work has been completed, whether it has failed or completed


getId

String getId()
Returns the unique ID of this unit of work, lazily creating one if it does not yet have one

Returns:


Copyright © 2008 Apache Software Foundation. All Rights Reserved.