org.apache.camel.spi
Interface TraceableUnitOfWork

All Superinterfaces:
UnitOfWork
All Known Implementing Classes:
DefaultUnitOfWork

public interface TraceableUnitOfWork
extends UnitOfWork

A Unit of work that is also traceable with the TraceInterceptor so we can trace the excact route path a given Exchange has been processed.

Version:
$Revision: 788766 $

Method Summary
 void addTraced(RouteNode entry)
          Adds the entry that was intercepted
 int getAndIncrement(ProcessorDefinition node)
          A private counter that increments, is used to as book keeping how far this exchange have been intercepted by the general intercept().
 RouteNode getLastNode()
          Gets the last node, is null if no last exists.
 List<RouteNode> getNodes()
          Gets the current list of nodes, representing the route path the current Exchange has currently taken.
 RouteNode getSecondLastNode()
          Gets the 2nd last node, is null if no last exists.
 
Methods inherited from interface org.apache.camel.spi.UnitOfWork
addSynchronization, done, getId, getOriginalInMessage, handoverSynchronization, removeSynchronization
 

Method Detail

addTraced

void addTraced(RouteNode entry)
Adds the entry that was intercepted

Parameters:
entry - the entry

getLastNode

RouteNode getLastNode()
Gets the last node, is null if no last exists.


getSecondLastNode

RouteNode getSecondLastNode()
Gets the 2nd last node, is null if no last exists.


getNodes

List<RouteNode> getNodes()
Gets the current list of nodes, representing the route path the current Exchange has currently taken.


getAndIncrement

int getAndIncrement(ProcessorDefinition node)
A private counter that increments, is used to as book keeping how far this exchange have been intercepted by the general intercept().

We need this special book keeping to keep correct order when dealing with concurrent exchanges being routed in the same route path.

Parameters:
node - the intercept node
Returns:
the current count


Apache CAMEL