org.apache.camel.spi
Interface ManagementAgent

All Superinterfaces:
Service
All Known Implementing Classes:
DefaultManagementAgent

public interface ManagementAgent
extends Service

Camel JMX service agent


Method Summary
 Integer getConnectorPort()
          Gets the port clients must use to connect
 Boolean getCreateConnector()
          Whether connector is created, allowing clients to connect remotely
 String getMBeanObjectDomainName()
          Get domain name for Camel MBeans.
 MBeanServer getMBeanServer()
          Get the MBeanServer which hosts managed objects.
 String getMBeanServerDefaultDomain()
          Gets the default domain on the MBean server
 Boolean getOnlyRegisterProcessorWithCustomId()
          Whether to only register processors which has a custom id assigned.
 Boolean getRegisterAlways()
          Whether to always register mbeans.
 Boolean getRegisterNewRoutes()
          Whether to register mbeans when starting a new route

This option is default true.

 Integer getRegistryPort()
          Gets the port used by LocateRegistry.
 String getServiceUrlPath()
          Gets the service url
 Boolean getUsePlatformMBeanServer()
          Whether to use the platform MBean Server.
 boolean isRegistered(ObjectName name)
          Is the given object registered
 void register(Object obj, ObjectName name)
          Registers object with management infrastructure with a specific name.
 void register(Object obj, ObjectName name, boolean forceRegistration)
          Registers object with management infrastructure with a specific name.
 void setConnectorPort(Integer port)
          Sets the port clients must use to connect
 void setCreateConnector(Boolean createConnector)
          Whether connector should be created, allowing clients to connect remotely
 void setMBeanObjectDomainName(String domainName)
          Sets the object domain name
 void setMBeanServer(MBeanServer mbeanServer)
          Sets a custom mbean server to use
 void setMBeanServerDefaultDomain(String domain)
          Sets the default domain on the MBean server
 void setOnlyRegisterProcessorWithCustomId(Boolean onlyRegisterProcessorWithCustomId)
          Whether to only register processors which has a custom id assigned.
 void setRegisterAlways(Boolean registerAlways)
          Whether to always register mbeans.
 void setRegisterNewRoutes(Boolean registerNewRoutes)
          Whether to register mbeans when starting a new route

This option is default true.

 void setRegistryPort(Integer port)
          Sets the port used by LocateRegistry.
 void setServiceUrlPath(String url)
          Sets the service url
 void setUsePlatformMBeanServer(Boolean usePlatformMBeanServer)
          Whether to use the platform MBean Server.
 void unregister(ObjectName name)
          Unregisters object based upon registered name
 
Methods inherited from interface org.apache.camel.Service
start, stop
 

Method Detail

register

void register(Object obj,
              ObjectName name)
              throws JMException
Registers object with management infrastructure with a specific name. Object must be annotated or implement standard MBean interface.

Parameters:
obj - the object to register
name - the name
Throws:
JMException - is thrown if the registration failed

register

void register(Object obj,
              ObjectName name,
              boolean forceRegistration)
              throws JMException
Registers object with management infrastructure with a specific name. Object must be annotated or implement standard MBean interface.

Parameters:
obj - the object to register
name - the name
forceRegistration - 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

void unregister(ObjectName name)
                throws JMException
Unregisters object based upon registered name

Parameters:
name - the name
Throws:
JMException - is thrown if the unregistration failed

isRegistered

boolean isRegistered(ObjectName name)
Is the given object registered

Parameters:
name - the name
Returns:
true if registered

getMBeanServer

MBeanServer getMBeanServer()
Get the MBeanServer which hosts managed objects.

Notice: If the JMXEnabled configuration is not set to true, this method will return null.

Returns:
the MBeanServer

setMBeanServer

void setMBeanServer(MBeanServer mbeanServer)
Sets a custom mbean server to use

Parameters:
mbeanServer - the custom mbean server

getMBeanObjectDomainName

String getMBeanObjectDomainName()
Get domain name for Camel MBeans.

Notice: That this can be different that the default domain name of the MBean Server.

Returns:
domain name

setRegistryPort

void setRegistryPort(Integer port)
Sets the port used by LocateRegistry.

Parameters:
port - the port

getRegistryPort

Integer getRegistryPort()
Gets the port used by LocateRegistry.

Returns:
the port

setConnectorPort

void setConnectorPort(Integer port)
Sets the port clients must use to connect

Parameters:
port - the port

getConnectorPort

Integer getConnectorPort()
Gets the port clients must use to connect

Returns:
the port

setMBeanServerDefaultDomain

void setMBeanServerDefaultDomain(String domain)
Sets the default domain on the MBean server

Parameters:
domain - the domain

getMBeanServerDefaultDomain

String getMBeanServerDefaultDomain()
Gets the default domain on the MBean server

Returns:
the domain

setMBeanObjectDomainName

void setMBeanObjectDomainName(String domainName)
Sets the object domain name

Parameters:
domainName - the object domain name

setServiceUrlPath

void setServiceUrlPath(String url)
Sets the service url

Parameters:
url - the service url

getServiceUrlPath

String getServiceUrlPath()
Gets the service url

Returns:
the url

setCreateConnector

void setCreateConnector(Boolean createConnector)
Whether connector should be created, allowing clients to connect remotely

Parameters:
createConnector - true to create connector

getCreateConnector

Boolean getCreateConnector()
Whether connector is created, allowing clients to connect remotely

Returns:
true if connector is created

setUsePlatformMBeanServer

void setUsePlatformMBeanServer(Boolean usePlatformMBeanServer)
Whether to use the platform MBean Server.

Parameters:
usePlatformMBeanServer - true to use platform MBean server

getUsePlatformMBeanServer

Boolean getUsePlatformMBeanServer()
Whether to use the platform MBean Server.

Returns:
true if platform MBean server is to be used

getOnlyRegisterProcessorWithCustomId

Boolean getOnlyRegisterProcessorWithCustomId()
Whether to only register processors which has a custom id assigned.

This allows you to filter unwanted processors.

Returns:
true if only processors with custom id is registered

setOnlyRegisterProcessorWithCustomId

void setOnlyRegisterProcessorWithCustomId(Boolean onlyRegisterProcessorWithCustomId)
Whether to only register processors which has a custom id assigned.

This allows you to filter unwanted processors.

Parameters:
onlyRegisterProcessorWithCustomId - true to only register if custom id has been assigned

getRegisterAlways

Boolean getRegisterAlways()
Whether to always register mbeans.

This option is default false.

Important: If this option is enabled then any service is registered as mbean. When using dynamic EIP patterns using unique endpoint urls, you may create excessive mbeans in the registry. This could lead to degraded performance as memory consumption will rise due the rising number of mbeans.

Returns:
true if always registering

setRegisterAlways

void setRegisterAlways(Boolean registerAlways)
Whether to always register mbeans.

This option is default false.

Important: If this option is enabled then any service is registered as mbean. When using dynamic EIP patterns using unique endpoint urls, you may create excessive mbeans in the registry. This could lead to degraded performance as memory consumption will rise due the rising number of mbeans.

Parameters:
registerAlways - true to always register

getRegisterNewRoutes

Boolean getRegisterNewRoutes()
Whether to register mbeans when starting a new route

This option is default true.

Returns:
true to register when starting a new route

setRegisterNewRoutes

void setRegisterNewRoutes(Boolean registerNewRoutes)
Whether to register mbeans when starting a new route

This option is default true.

Parameters:
registerNewRoutes - true to register when starting a new route


Apache CAMEL