org.apache.camel.spi
Interface ManagementNameStrategy

All Known Implementing Classes:
DefaultManagementNameStrategy

public interface ManagementNameStrategy

Strategy for assigning the name part of the ObjectName for a managed CamelContext.

A strategy is needed as you can run multiple CamelContext in the same JVM, and want them to be enlisted in the JVM wide JMXMBeanServer. And this requires a strategy to be able to calculate unique names, in case of clashes. Or to enforce an explicit fixed name, to ensure the JMX name is not using dynamic counters etc.

This strategy supports a naming pattern which supports at least the following tokens

See Also:
CamelContextNameStrategy, DefaultManagementNameStrategy

Method Summary
 String getName()
          Gets the name

The isFixedName() determines if the name can be re-calculated such as when using a counter, or the name is always fixed.

 String getNamePattern()
          Gets the custom name pattern.
 String getNextName()
          Gets the next calculated name, if this strategy is not using fixed names.
 boolean isFixedName()
          Whether the name will be fixed, or allow re-calculation such as by using an unique counter.
 void setNamePattern(String pattern)
          Sets a custom name pattern, which will be used instead of any default patterns.
 

Method Detail

getNamePattern

String getNamePattern()
Gets the custom name pattern.

Returns:
the custom name pattern, or null if using the default pattern strategy.

setNamePattern

void setNamePattern(String pattern)
Sets a custom name pattern, which will be used instead of any default patterns.

Parameters:
pattern - a custom name pattern.

getName

String getName()
Gets the name

The isFixedName() determines if the name can be re-calculated such as when using a counter, or the name is always fixed.

Returns:
the name.

getNextName

String getNextName()
Gets the next calculated name, if this strategy is not using fixed names.

The isFixedName() determines if the name can be re-calculated such as when using a counter, or the name is always fixed.

Returns:
the next name

isFixedName

boolean isFixedName()
Whether the name will be fixed, or allow re-calculation such as by using an unique counter.

Returns:
true for fixed names, false for names which can re-calculated


Apache CAMEL