org.apache.camel.management
Class DefaultManagementNamingStrategy

java.lang.Object
  extended by org.apache.camel.management.DefaultManagementNamingStrategy
All Implemented Interfaces:
ManagementNamingStrategy

public class DefaultManagementNamingStrategy
extends Object
implements ManagementNamingStrategy

Naming strategy used when registering MBeans.


Field Summary
protected  String domainName
           
protected  String hostName
           
static String KEY_CONTEXT
           
static String KEY_NAME
           
static String KEY_TYPE
           
static String TYPE_COMPONENT
           
static String TYPE_CONSUMER
           
static String TYPE_CONTEXT
           
static String TYPE_ENDPOINT
           
static String TYPE_ERRORHANDLER
           
static String TYPE_EVENT_NOTIFIER
           
static String TYPE_FABRIC
           
static String TYPE_PROCESSOR
           
static String TYPE_PRODUCER
           
static String TYPE_ROUTE
           
static String TYPE_SERVICE
           
static String TYPE_THREAD_POOL
           
static String TYPE_TRACER
           
static String VALUE_UNKNOWN
           
 
Constructor Summary
DefaultManagementNamingStrategy()
           
DefaultManagementNamingStrategy(String domainName)
           
 
Method Summary
protected  ObjectName createObjectName(StringBuilder buffer)
          Factory method to create an ObjectName escaping any required characters
protected  String getContextId(CamelContext context)
           
protected  String getContextId(String name)
           
 String getDomainName()
           
protected  String getEndpointId(Endpoint ep)
           
 String getHostName()
           
 ObjectName getObjectNameForCamelContext(CamelContext context)
           
 ObjectName getObjectNameForCamelContext(String name)
           
 ObjectName getObjectNameForComponent(Component component, String name)
           
 ObjectName getObjectNameForConsumer(CamelContext context, Consumer consumer)
           
 ObjectName getObjectNameForEndpoint(Endpoint endpoint)
           
 ObjectName getObjectNameForErrorHandler(RouteContext routeContext, Processor errorHandler, ErrorHandlerBuilder builder)
           
 ObjectName getObjectNameForEventNotifier(CamelContext context, EventNotifier eventNotifier)
           
 ObjectName getObjectNameForProcessor(CamelContext context, Processor processor, ProcessorDefinition<?> definition)
           
 ObjectName getObjectNameForProducer(CamelContext context, Producer producer)
           
 ObjectName getObjectNameForRoute(Route route)
           
 ObjectName getObjectNameForService(CamelContext context, Service service)
           
 ObjectName getObjectNameForThreadPool(CamelContext context, ThreadPoolExecutor threadPool, String id, String sourceId)
           
 ObjectName getObjectNameForTracer(CamelContext context, InterceptStrategy tracer)
           
 void setDomainName(String domainName)
           
 void setHostName(String hostName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VALUE_UNKNOWN

public static final String VALUE_UNKNOWN
See Also:
Constant Field Values

KEY_NAME

public static final String KEY_NAME
See Also:
Constant Field Values

KEY_TYPE

public static final String KEY_TYPE
See Also:
Constant Field Values

KEY_CONTEXT

public static final String KEY_CONTEXT
See Also:
Constant Field Values

TYPE_CONTEXT

public static final String TYPE_CONTEXT
See Also:
Constant Field Values

TYPE_ENDPOINT

public static final String TYPE_ENDPOINT
See Also:
Constant Field Values

TYPE_PROCESSOR

public static final String TYPE_PROCESSOR
See Also:
Constant Field Values

TYPE_CONSUMER

public static final String TYPE_CONSUMER
See Also:
Constant Field Values

TYPE_PRODUCER

public static final String TYPE_PRODUCER
See Also:
Constant Field Values

TYPE_ROUTE

public static final String TYPE_ROUTE
See Also:
Constant Field Values

TYPE_COMPONENT

public static final String TYPE_COMPONENT
See Also:
Constant Field Values

TYPE_TRACER

public static final String TYPE_TRACER
See Also:
Constant Field Values

TYPE_EVENT_NOTIFIER

public static final String TYPE_EVENT_NOTIFIER
See Also:
Constant Field Values

TYPE_ERRORHANDLER

public static final String TYPE_ERRORHANDLER
See Also:
Constant Field Values

TYPE_THREAD_POOL

public static final String TYPE_THREAD_POOL
See Also:
Constant Field Values

TYPE_SERVICE

public static final String TYPE_SERVICE
See Also:
Constant Field Values

TYPE_FABRIC

public static final String TYPE_FABRIC
See Also:
Constant Field Values

domainName

protected String domainName

hostName

protected String hostName
Constructor Detail

DefaultManagementNamingStrategy

public DefaultManagementNamingStrategy()

DefaultManagementNamingStrategy

public DefaultManagementNamingStrategy(String domainName)
Method Detail

getObjectNameForCamelContext

public ObjectName getObjectNameForCamelContext(String name)
                                        throws MalformedObjectNameException
Specified by:
getObjectNameForCamelContext in interface ManagementNamingStrategy
Throws:
MalformedObjectNameException

getObjectNameForCamelContext

public ObjectName getObjectNameForCamelContext(CamelContext context)
                                        throws MalformedObjectNameException
Specified by:
getObjectNameForCamelContext in interface ManagementNamingStrategy
Throws:
MalformedObjectNameException

getObjectNameForEndpoint

public ObjectName getObjectNameForEndpoint(Endpoint endpoint)
                                    throws MalformedObjectNameException
Specified by:
getObjectNameForEndpoint in interface ManagementNamingStrategy
Throws:
MalformedObjectNameException

getObjectNameForComponent

public ObjectName getObjectNameForComponent(Component component,
                                            String name)
                                     throws MalformedObjectNameException
Specified by:
getObjectNameForComponent in interface ManagementNamingStrategy
Throws:
MalformedObjectNameException

getObjectNameForProcessor

public ObjectName getObjectNameForProcessor(CamelContext context,
                                            Processor processor,
                                            ProcessorDefinition<?> definition)
                                     throws MalformedObjectNameException
Specified by:
getObjectNameForProcessor in interface ManagementNamingStrategy
Throws:
MalformedObjectNameException

getObjectNameForErrorHandler

public ObjectName getObjectNameForErrorHandler(RouteContext routeContext,
                                               Processor errorHandler,
                                               ErrorHandlerBuilder builder)
                                        throws MalformedObjectNameException
Specified by:
getObjectNameForErrorHandler in interface ManagementNamingStrategy
Throws:
MalformedObjectNameException

getObjectNameForConsumer

public ObjectName getObjectNameForConsumer(CamelContext context,
                                           Consumer consumer)
                                    throws MalformedObjectNameException
Specified by:
getObjectNameForConsumer in interface ManagementNamingStrategy
Throws:
MalformedObjectNameException

getObjectNameForProducer

public ObjectName getObjectNameForProducer(CamelContext context,
                                           Producer producer)
                                    throws MalformedObjectNameException
Specified by:
getObjectNameForProducer in interface ManagementNamingStrategy
Throws:
MalformedObjectNameException

getObjectNameForTracer

public ObjectName getObjectNameForTracer(CamelContext context,
                                         InterceptStrategy tracer)
                                  throws MalformedObjectNameException
Specified by:
getObjectNameForTracer in interface ManagementNamingStrategy
Throws:
MalformedObjectNameException

getObjectNameForEventNotifier

public ObjectName getObjectNameForEventNotifier(CamelContext context,
                                                EventNotifier eventNotifier)
                                         throws MalformedObjectNameException
Specified by:
getObjectNameForEventNotifier in interface ManagementNamingStrategy
Throws:
MalformedObjectNameException

getObjectNameForRoute

public ObjectName getObjectNameForRoute(Route route)
                                 throws MalformedObjectNameException
Specified by:
getObjectNameForRoute in interface ManagementNamingStrategy
Throws:
MalformedObjectNameException

getObjectNameForService

public ObjectName getObjectNameForService(CamelContext context,
                                          Service service)
                                   throws MalformedObjectNameException
Specified by:
getObjectNameForService in interface ManagementNamingStrategy
Throws:
MalformedObjectNameException

getObjectNameForThreadPool

public ObjectName getObjectNameForThreadPool(CamelContext context,
                                             ThreadPoolExecutor threadPool,
                                             String id,
                                             String sourceId)
                                      throws MalformedObjectNameException
Specified by:
getObjectNameForThreadPool in interface ManagementNamingStrategy
Throws:
MalformedObjectNameException

getDomainName

public String getDomainName()

setDomainName

public void setDomainName(String domainName)

getHostName

public String getHostName()

setHostName

public void setHostName(String hostName)

getContextId

protected String getContextId(CamelContext context)

getContextId

protected String getContextId(String name)

getEndpointId

protected String getEndpointId(Endpoint ep)

createObjectName

protected ObjectName createObjectName(StringBuilder buffer)
                               throws MalformedObjectNameException
Factory method to create an ObjectName escaping any required characters

Throws:
MalformedObjectNameException


Apache CAMEL