org.apache.camel.management
Class DefaultInstrumentationAgent
java.lang.Object
org.apache.camel.impl.ServiceSupport
org.apache.camel.management.DefaultInstrumentationAgent
- All Implemented Interfaces:
- Service, InstrumentationAgent
public class DefaultInstrumentationAgent
- extends ServiceSupport
- implements InstrumentationAgent
Default implementation of the Camel JMX service agent
Methods inherited from class org.apache.camel.impl.ServiceSupport |
addChildService, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, removeChildService, start, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_DOMAIN
public static final String DEFAULT_DOMAIN
- See Also:
- Constant Field Values
DEFAULT_HOST
public static final String DEFAULT_HOST
- See Also:
- Constant Field Values
DEFAULT_REGISTRY_PORT
public static final int DEFAULT_REGISTRY_PORT
- See Also:
- Constant Field Values
DEFAULT_CONNECTION_PORT
public static final int DEFAULT_CONNECTION_PORT
- See Also:
- Constant Field Values
DEFAULT_SERVICE_URL_PATH
public static final String DEFAULT_SERVICE_URL_PATH
- See Also:
- Constant Field Values
DefaultInstrumentationAgent
public DefaultInstrumentationAgent()
finalizeSettings
protected void finalizeSettings()
setRegistryPort
public void setRegistryPort(Integer value)
getRegistryPort
public Integer getRegistryPort()
setConnectorPort
public void setConnectorPort(Integer value)
getConnectorPort
public Integer getConnectorPort()
setMBeanServerDefaultDomain
public void setMBeanServerDefaultDomain(String value)
getMBeanServerDefaultDomain
public String getMBeanServerDefaultDomain()
setMBeanObjectDomainName
public void setMBeanObjectDomainName(String value)
getMBeanObjectDomainName
public String getMBeanObjectDomainName()
- Description copied from interface:
InstrumentationAgent
- Get domain name for Camel MBeans.
Notice: That this can be different that the default domain name of the MBean Server.
- Specified by:
getMBeanObjectDomainName
in interface InstrumentationAgent
- Returns:
- domain name
setServiceUrlPath
public void setServiceUrlPath(String value)
getServiceUrlPath
public String getServiceUrlPath()
setCreateConnector
public void setCreateConnector(Boolean flag)
getCreateConnector
public Boolean getCreateConnector()
setUsePlatformMBeanServer
public void setUsePlatformMBeanServer(Boolean flag)
getUsePlatformMBeanServer
public Boolean getUsePlatformMBeanServer()
getOnlyRegisterProcessorWithCustomId
public Boolean getOnlyRegisterProcessorWithCustomId()
setOnlyRegisterProcessorWithCustomId
public void setOnlyRegisterProcessorWithCustomId(Boolean onlyRegisterProcessorWithCustomId)
setServer
public void setServer(MBeanServer value)
getMBeanServer
public MBeanServer getMBeanServer()
- Description copied from interface:
InstrumentationAgent
- Get the MBeanServer which hosts managed objects.
Notice: If the JMXEnabled configuration is not set to true,
this method will return null.
- Specified by:
getMBeanServer
in interface InstrumentationAgent
- Returns:
- the MBeanServer
getExecutorService
public ExecutorService getExecutorService()
setExecutorService
public void setExecutorService(ExecutorService executorService)
register
public void register(Object obj,
ObjectName name)
throws JMException
- Description copied from interface:
InstrumentationAgent
- Registers object with management infrastructure with a specific name. Object must be annotated or
implement standard MBean interface.
- Specified by:
register
in interface InstrumentationAgent
- Parameters:
obj
- the object to registername
- the name
- Throws:
JMException
- is thrown if the registration failed
register
public void register(Object obj,
ObjectName name,
boolean forceRegistration)
throws JMException
- Description copied from interface:
InstrumentationAgent
- Registers object with management infrastructure with a specific name. Object must be annotated or
implement standard MBean interface.
- Specified by:
register
in interface InstrumentationAgent
- Parameters:
obj
- the object to registername
- the nameforceRegistration
- if set to true, then object will be registered despite
existing object is already registered with the name.
- Throws:
JMException
- is thrown if the registration failed
unregister
public void unregister(ObjectName name)
throws JMException
- Description copied from interface:
InstrumentationAgent
- Unregisters object based upon registered name
- Specified by:
unregister
in interface InstrumentationAgent
- Parameters:
name
- the name
- Throws:
JMException
- is thrown if the unregistration failed
doStart
protected void doStart()
throws Exception
- Specified by:
doStart
in class ServiceSupport
- Throws:
Exception
doStop
protected void doStop()
throws Exception
- Specified by:
doStop
in class ServiceSupport
- Throws:
Exception
createMBeanServer
protected void createMBeanServer()
findOrCreateMBeanServer
protected MBeanServer findOrCreateMBeanServer()
createJmxConnector
protected void createJmxConnector(String host)
throws IOException
- Throws:
IOException
Apache CAMEL