org.apache.camel.impl
Class DefaultNodeIdFactory

java.lang.Object
  extended by org.apache.camel.impl.DefaultNodeIdFactory
All Implemented Interfaces:
NodeIdFactory
Direct Known Subclasses:
TestSupportNodeIdFactory

public class DefaultNodeIdFactory
extends Object
implements NodeIdFactory

Default id factory.

Version:

Field Summary
protected static Map<String,AtomicInteger> nodeCounters
           
 
Constructor Summary
DefaultNodeIdFactory()
           
 
Method Summary
 String createId(OptionalIdentifiedDefinition<?> definition)
          Creates an id for the given model definiton.
protected static AtomicInteger getNodeCounter(String key)
          Returns the counter for the given node key, lazily creating one if necessary
protected static void resetAllCounters()
          Helper method for test purposes that allows tests to start clean (made protected to ensure that it is not called accidentally)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nodeCounters

protected static Map<String,AtomicInteger> nodeCounters
Constructor Detail

DefaultNodeIdFactory

public DefaultNodeIdFactory()
Method Detail

createId

public String createId(OptionalIdentifiedDefinition<?> definition)
Description copied from interface: NodeIdFactory
Creates an id for the given model definiton.

Specified by:
createId in interface NodeIdFactory
Parameters:
definition - model definition
Returns:
the id created

getNodeCounter

protected static AtomicInteger getNodeCounter(String key)
Returns the counter for the given node key, lazily creating one if necessary


resetAllCounters

protected static void resetAllCounters()
Helper method for test purposes that allows tests to start clean (made protected to ensure that it is not called accidentally)



Apache CAMEL