org.apache.camel.impl
Class DefaultTracedRouteNodes

java.lang.Object
  extended by org.apache.camel.impl.DefaultTracedRouteNodes
All Implemented Interfaces:
TracedRouteNodes

public class DefaultTracedRouteNodes
extends Object
implements TracedRouteNodes

Version:

Constructor Summary
DefaultTracedRouteNodes()
           
 
Method Summary
 void addTraced(RouteNode entry)
          Adds the entry that was intercepted
 void clear()
          Clears all traced information
 int getAndIncrementCounter(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.
 void popBlock()
          Pops the last block from tracing.
 void pushBlock()
          Prepares a new block for tracing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultTracedRouteNodes

public DefaultTracedRouteNodes()
Method Detail

addTraced

public void addTraced(RouteNode entry)
Description copied from interface: TracedRouteNodes
Adds the entry that was intercepted

Specified by:
addTraced in interface TracedRouteNodes
Parameters:
entry - the entry

getLastNode

public RouteNode getLastNode()
Description copied from interface: TracedRouteNodes
Gets the last node, is null if no last exists.

Specified by:
getLastNode in interface TracedRouteNodes
Returns:
the last node

getSecondLastNode

public RouteNode getSecondLastNode()
Description copied from interface: TracedRouteNodes
Gets the 2nd last node, is null if no last exists.

Specified by:
getSecondLastNode in interface TracedRouteNodes
Returns:
the 2nd last

getNodes

public List<RouteNode> getNodes()
Description copied from interface: TracedRouteNodes
Gets the current list of nodes, representing the route path the current Exchange has currently taken.

Specified by:
getNodes in interface TracedRouteNodes
Returns:
the node path

popBlock

public void popBlock()
Description copied from interface: TracedRouteNodes
Pops the last block from tracing.

Specified by:
popBlock in interface TracedRouteNodes

pushBlock

public void pushBlock()
Description copied from interface: TracedRouteNodes
Prepares a new block for tracing.

This is needed when you have child block such as a multicast or aggregator

Specified by:
pushBlock in interface TracedRouteNodes

clear

public void clear()
Description copied from interface: TracedRouteNodes
Clears all traced information

Specified by:
clear in interface TracedRouteNodes

getAndIncrementCounter

public int getAndIncrementCounter(ProcessorDefinition<?> node)
Description copied from interface: TracedRouteNodes
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.

Specified by:
getAndIncrementCounter in interface TracedRouteNodes
Parameters:
node - the intercept node
Returns:
the current count


Apache CAMEL