Package org.apache.camel.impl.engine
Class DefaultCamelContextNameStrategy
- java.lang.Object
-
- org.apache.camel.impl.engine.DefaultCamelContextNameStrategy
-
- All Implemented Interfaces:
org.apache.camel.spi.CamelContextNameStrategy
public class DefaultCamelContextNameStrategy extends Object implements org.apache.camel.spi.CamelContextNameStrategy
A default name strategy which auto assigns a name using a prefix-counter pattern.
-
-
Constructor Summary
Constructors Constructor Description DefaultCamelContextNameStrategy()
DefaultCamelContextNameStrategy(String prefix)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getName()
static int
getNextCounter()
String
getNextName()
boolean
isFixedName()
static void
setCounter(int value)
To reset the counter, should only be used for testing purposes.
-
-
-
Constructor Detail
-
DefaultCamelContextNameStrategy
public DefaultCamelContextNameStrategy()
-
DefaultCamelContextNameStrategy
public DefaultCamelContextNameStrategy(String prefix)
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getName
in interfaceorg.apache.camel.spi.CamelContextNameStrategy
-
getNextName
public String getNextName()
- Specified by:
getNextName
in interfaceorg.apache.camel.spi.CamelContextNameStrategy
-
isFixedName
public boolean isFixedName()
- Specified by:
isFixedName
in interfaceorg.apache.camel.spi.CamelContextNameStrategy
-
getNextCounter
public static int getNextCounter()
-
setCounter
public static void setCounter(int value)
To reset the counter, should only be used for testing purposes.- Parameters:
value
- the counter value
-
-