org.apache.camel.core.osgi
Class OsgiCamelContextNameStrategy

java.lang.Object
  extended by org.apache.camel.core.osgi.OsgiCamelContextNameStrategy
All Implemented Interfaces:
org.apache.camel.spi.CamelContextNameStrategy

public class OsgiCamelContextNameStrategy
extends Object
implements org.apache.camel.spi.CamelContextNameStrategy

In OSGi we want to use a CamelContextNameStrategy that finds a free name in the OSGi Service Registry to be used for auto assigned names.

If there is a name clash in the OSGi registry, then a new candidate name is used by appending a unique counter.


Constructor Summary
OsgiCamelContextNameStrategy(org.osgi.framework.BundleContext context)
           
 
Method Summary
 String getName()
           
static int getNextCounter()
           
 String getNextName()
           
 boolean isFixedName()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OsgiCamelContextNameStrategy

public OsgiCamelContextNameStrategy(org.osgi.framework.BundleContext context)
Method Detail

getName

public String getName()
Specified by:
getName in interface org.apache.camel.spi.CamelContextNameStrategy

getNextName

public String getNextName()
Specified by:
getNextName in interface org.apache.camel.spi.CamelContextNameStrategy

isFixedName

public boolean isFixedName()
Specified by:
isFixedName in interface org.apache.camel.spi.CamelContextNameStrategy

getNextCounter

public static int getNextCounter()


Apache Camel