public final class OsgiNamingHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
findFreeCamelContextName(org.osgi.framework.BundleContext context,
String prefix,
String key,
AtomicInteger counter,
boolean checkFirst)
Checks the OSGi service registry for a free name (uses the counter if there is a clash to find next free name)
|
static int |
getNextCounter(AtomicInteger counter) |
public static String findFreeCamelContextName(org.osgi.framework.BundleContext context, String prefix, String key, AtomicInteger counter, boolean checkFirst)
context - the bundle contextprefix - the prefix for the namekey - the key to use in the OSGi filter; either OsgiCamelContextPublisher.CONTEXT_NAME_PROPERTY
or OsgiCamelContextPublisher.CONTEXT_MANAGEMENT_NAME_PROPERTY.counter - the countercheckFirst - true to check the prefix name as-is before using the counter, false the counter is used immediatelypublic static int getNextCounter(AtomicInteger counter)
Apache Camel