org.apache.camel.management
Class CamelNamingStrategy

java.lang.Object
  extended by org.apache.camel.management.CamelNamingStrategy

public class CamelNamingStrategy
extends Object


Field Summary
protected  String domainName
           
static String GROUP_ENDPOINTS
           
static String GROUP_ROUTE_TYPE
           
static String GROUP_ROUTES
           
static String GROUP_SERVICES
           
protected  String hostName
           
static String KEY_BUILDER
           
static String KEY_COMPONENT
           
static String KEY_CONTEXT
           
static String KEY_GROUP
           
static String KEY_NAME
           
static String KEY_ROUTE
           
static String KEY_ROUTE_TYPE
           
static String KEY_TYPE
           
static String VALUE_DEFAULT_BUILDER
           
static String VALUE_ROUTE
           
static String VALUE_STATS
           
static String VALUE_UNKNOWN
           
 
Constructor Summary
CamelNamingStrategy()
           
CamelNamingStrategy(String domainName)
           
 
Method Summary
protected  ObjectName createObjectName(StringBuffer buffer)
          Factory method to create an ObjectName escaping any required characters
protected  String getComponentId(Endpoint<? extends Exchange> ep)
           
protected  String getContextId(CamelContext context)
           
 String getDomainName()
           
protected  String getEndpointId(Endpoint<? extends Exchange> ep)
           
 String getHostName()
           
 ObjectName getObjectName(CamelContext context)
          Implements the naming strategy for a CamelContext.
 ObjectName getObjectName(CamelContext context, ManagedService mbean)
          Implements the naming strategy for a Service.
 ObjectName getObjectName(CamelContext context, PerformanceCounter mbean, RouteContext routeContext)
          Implements the naming strategy for a PerformanceCounter.
 ObjectName getObjectName(ManagedEndpoint mbean)
          Implements the naming strategy for a ManagedEndpoint.
 ObjectName getObjectName(ManagedRoute mbean)
          Implements the naming strategy for a ManagedRoute.
 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

VALUE_ROUTE

public static final String VALUE_ROUTE
See Also:
Constant Field Values

VALUE_STATS

public static final String VALUE_STATS
See Also:
Constant Field Values

VALUE_DEFAULT_BUILDER

public static final String VALUE_DEFAULT_BUILDER
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

KEY_GROUP

public static final String KEY_GROUP
See Also:
Constant Field Values

KEY_COMPONENT

public static final String KEY_COMPONENT
See Also:
Constant Field Values

KEY_BUILDER

public static final String KEY_BUILDER
See Also:
Constant Field Values

KEY_ROUTE_TYPE

public static final String KEY_ROUTE_TYPE
See Also:
Constant Field Values

KEY_ROUTE

public static final String KEY_ROUTE
See Also:
Constant Field Values

GROUP_ENDPOINTS

public static final String GROUP_ENDPOINTS
See Also:
Constant Field Values

GROUP_SERVICES

public static final String GROUP_SERVICES
See Also:
Constant Field Values

GROUP_ROUTES

public static final String GROUP_ROUTES
See Also:
Constant Field Values

GROUP_ROUTE_TYPE

public static final String GROUP_ROUTE_TYPE
See Also:
Constant Field Values

domainName

protected String domainName

hostName

protected String hostName
Constructor Detail

CamelNamingStrategy

public CamelNamingStrategy()

CamelNamingStrategy

public CamelNamingStrategy(String domainName)
Method Detail

getObjectName

public ObjectName getObjectName(CamelContext context)
                         throws MalformedObjectNameException
Implements the naming strategy for a CamelContext. The convention used for a CamelContext ObjectName is: <domain>:context=<context>,name=camel

Parameters:
context - the camel context
Returns:
generated ObjectName
Throws:
MalformedObjectNameException

getObjectName

public ObjectName getObjectName(ManagedEndpoint mbean)
                         throws MalformedObjectNameException
Implements the naming strategy for a ManagedEndpoint. The convention used for a ManagedEndpoint ObjectName is: <domain>:context=<context>,type=Services,endpoint=[urlPrefix]localPart

Parameters:
mbean -
Returns:
generated ObjectName
Throws:
MalformedObjectNameException

getObjectName

public ObjectName getObjectName(CamelContext context,
                                ManagedService mbean)
                         throws MalformedObjectNameException
Implements the naming strategy for a Service. The convention used for a Service ObjectName is <domain>:context=<context>,type=Services,endpoint=[urlPrefix]localPart

Parameters:
context - the camel context
mbean -
Returns:
generated ObjectName
Throws:
MalformedObjectNameException

getObjectName

public ObjectName getObjectName(ManagedRoute mbean)
                         throws MalformedObjectNameException
Implements the naming strategy for a ManagedRoute. The convention used for a ManagedEndpoint ObjectName is: <domain>:context=<context>,type=Routes,endpoint=[urlPrefix]localPart

Parameters:
mbean -
Returns:
generated ObjectName
Throws:
MalformedObjectNameException

getObjectName

public ObjectName getObjectName(CamelContext context,
                                PerformanceCounter mbean,
                                RouteContext routeContext)
                         throws MalformedObjectNameException
Implements the naming strategy for a PerformanceCounter. The convention used for a ManagedEndpoint ObjectName is: <domain>:context=<context>,type=Routes,endpoint=[urlPrefix]localPart

Parameters:
context - the camel context
mbean -
routeContext -
Returns:
generated ObjectName
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)

getComponentId

protected String getComponentId(Endpoint<? extends Exchange> ep)

getEndpointId

protected String getEndpointId(Endpoint<? extends Exchange> ep)

createObjectName

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

Throws:
MalformedObjectNameException


Copyright © 2008 IONA Open Source Community. All Rights Reserved.