org.apache.camel.impl
Class DefaultUnitOfWork

java.lang.Object
  extended by org.apache.camel.impl.DefaultUnitOfWork
All Implemented Interfaces:
Service, UnitOfWork

public class DefaultUnitOfWork
extends Object
implements UnitOfWork, Service

The default implementation of UnitOfWork

Version:
$Revision: 52393 $

Constructor Summary
DefaultUnitOfWork()
           
 
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
 boolean isSynchronous()
           
 void removeSynchronization(Synchronization synchronization)
          Removes a synchronization hook
 void reset()
          Deprecated. will be removed in Camel 2.0
 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

DefaultUnitOfWork

public DefaultUnitOfWork()
Method Detail

start

public void start()
           throws Exception
Description copied from interface: Service
Starts the service

Specified by:
start in interface Service
Throws:
Exception

stop

public void stop()
          throws Exception
Description copied from interface: Service
Stops the service

Specified by:
stop in interface Service
Throws:
Exception

addSynchronization

public void addSynchronization(Synchronization synchronization)
Description copied from interface: UnitOfWork
Adds a synchronization hook

Specified by:
addSynchronization in interface UnitOfWork
Parameters:
synchronization - the hook

removeSynchronization

public void removeSynchronization(Synchronization synchronization)
Description copied from interface: UnitOfWork
Removes a synchronization hook

Specified by:
removeSynchronization in interface UnitOfWork
Parameters:
synchronization - the hook

reset

public void reset()
Deprecated. will be removed in Camel 2.0


done

public void done(Exchange exchange)
Description copied from interface: UnitOfWork
Invoked when this unit of work has been completed, whether it has failed or completed

Specified by:
done in interface UnitOfWork
Parameters:
exchange - the current exchange

isSynchronous

public boolean isSynchronous()

getId

public String getId()
Description copied from interface: UnitOfWork
Returns the unique ID of this unit of work, lazily creating one if it does not yet have one

Specified by:
getId in interface UnitOfWork
Returns:
the unique ID


Copyright © 2008 IONA Open Source Community. All Rights Reserved.