Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mule.module.management.agent
Class JmxAgent

    java.lang.Object
      org.mule.AbstractAgent
          org.mule.module.management.agent.JmxAgent

All Implemented Interfaces:
  Agent, MuleContextAware, Disposable, Initialisable, Lifecycle, Startable, Stoppable, NamedObject

    public class JmxAgent

extends AbstractAgent

`JmxAgent` registers Mule Jmx management beans with an MBean server.

Nested Class Summary
`protected class` | `JmxAgent.MuleContextStartedListener`
`protected class` | `JmxAgent.MuleContextStoppedListener`

Field Summary
`protected boolean` | `containerMode`
`static Map<String,String>` | `DEFAULT_CONNECTOR_SERVER_PROPERTIES`
`static String` | `DEFAULT_JMX_AUTHENTICATOR` Default JMX Authenticator to use for securing remote access.
`static String` | `DEFAULT_REMOTING_URI`
`protected boolean` | `locateServer` Should MBeanServer be discovered.
`protected static Log` | `logger` Logger used by this class
`static String` | `NAME`

Fields inherited from class org.mule.AbstractAgent
`muleContext, name`

Fields inherited from interface org.mule.api.lifecycle.Initialisable
`PHASE_NAME`

Fields inherited from interface org.mule.api.lifecycle.Startable
`PHASE_NAME`

Fields inherited from interface org.mule.api.lifecycle.Stoppable
`PHASE_NAME`

Fields inherited from interface org.mule.api.lifecycle.Disposable
`PHASE_NAME`

Constructor Summary
`JmxAgent()`

Method Summary
`protected String` | `buildFullyQualifiedEndpointName(EndpointServiceMBean mBean, Connector connector)`
`void` | `dispose()` A lifecycle method where implementor should free up any resources.
`Map<String,Object>` | `getConnectorServerProperties()`
`String` | `getConnectorServerUrl()`
`String` | `getDescription()` A description of the agent that gets displayed in the splash screen when the Mule Context starts up.
`JmxSupportFactory` | `getJmxSupportFactory()`
`MBeanServer` | `getMBeanServer()`
`Registry` | `getRmiRegistry()`
`void` | `initialise()` Method used to perform any initialisation work.
`protected void` | `initRMI()`
`boolean` | `isCreateRmiRegistry()`
`boolean` | `isCreateServer()`
`boolean` | `isEnableStatistics()`
`boolean` | `isLocateServer()`
`protected void` | `registerConfigurationService()`
`protected void` | `registerConnectorServices()`
`protected void` | `registerEndpointServices()`
`protected void` | `registerModelServices()`
`protected void` | `registerMuleService()`
`protected void` | `registerServiceServices()`
`protected void` | `registerStatisticsService()`
`protected void` | `registerWrapperService()` Register a Java Service Wrapper agent.
`void` | `setConnectorServerProperties(Map<String,Object> connectorServerProperties)` Setter for property 'connectorServerProperties'.
`void` | `setConnectorServerUrl(String connectorServerUrl)`
`void` | `setCreateRmiRegistry(boolean createRmiRegistry)`
`void` | `setCreateServer(boolean createServer)`
`void` | `setCredentials(Map<String,String> newCredentials)` Setter for property 'credentials'.
`void` | `setEnableStatistics(boolean enableStatistics)`
`void` | `setJmxSupportFactory(JmxSupportFactory jmxSupportFactory)`
`void` | `setLocateServer(boolean locateServer)`
`void` | `setMBeanServer(MBeanServer mBeanServer)`
`void` | `setRmiRegistry(Registry rmiRegistry)`
`void` | `start()`
`void` | `stop()`
`protected void` | `unregisterMBeansIfNecessary()`
`protected void` | `unregisterMBeansIfNecessary(boolean containerMode)`

Methods inherited from class org.mule.AbstractAgent
`getName, setMuleContext, setName`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### NAME

    public static final String NAME

See Also:
  Constant Field Values

### DEFAULT_REMOTING_URI

    public static final String DEFAULT_REMOTING_URI

See Also:
  Constant Field Values

### DEFAULT_CONNECTOR_SERVER_PROPERTIES

    public static final Map<String,String> DEFAULT_CONNECTOR_SERVER_PROPERTIES

### DEFAULT_JMX_AUTHENTICATOR

    public static final String DEFAULT_JMX_AUTHENTICATOR

  Default JMX Authenticator to use for securing remote access.

### logger

    protected static final Log logger

  Logger used by this class

### locateServer

    protected boolean locateServer

  Should MBeanServer be discovered.

### containerMode

    protected boolean containerMode

Constructor Detail

### JmxAgent

    public JmxAgent()

Method Detail

### getDescription

    public String getDescription()

  Description copied from interface: `Agent`
  A description of the agent that gets displayed in the splash screen when the Mule Context starts up.

  Specified by:
    `getDescription` in interface `Agent`
  Overrides:
    `getDescription` in class `AbstractAgent`
  Returns:
    a 1 line description of the agent.

### initialise

    public void initialise()
                    throws InitialisationException

  Method used to perform any initialisation work. If a fatal error occurs during initialisation an `InitialisationException` should be thrown, causing the Mule instance to shutdown. If the error is recoverable, say by retrying to connect, a `RecoverableException` should be thrown. There is no guarantee that by throwing a Recoverable exception that the Mule instance will not shut down.

  Throws:
    `InitialisationException` - if a fatal error occurs causing the Mule instance to shutdown
    `RecoverableException` - if an error occurs that can be recovered from

### initRMI

    protected void initRMI()
                    throws Exception

  Throws:
    `Exception`

### start

    public void start()
               throws MuleException

  Throws:
    `MuleException`

### stop

    public void stop()
              throws MuleException

  Throws:
    `MuleException`

### dispose

    public void dispose()

  A lifecycle method where implementor should free up any resources. If an exception is thrown it should just be logged and processing should continue. This method should not throw Runtime exceptions.

### registerWrapperService

    protected void registerWrapperService()
                                   throws MuleException

  Register a Java Service Wrapper agent.

  Throws:
    `MuleException` - if registration failed

### registerStatisticsService

    protected void registerStatisticsService()
                                      throws NotCompliantMBeanException,
                                             MBeanRegistrationException,
                                             InstanceAlreadyExistsException,
                                             MalformedObjectNameException

  Throws:
    `NotCompliantMBeanException`
    `MBeanRegistrationException`
    `InstanceAlreadyExistsException`
    `MalformedObjectNameException`

### registerModelServices

    protected void registerModelServices()
                                  throws NotCompliantMBeanException,
                                         MBeanRegistrationException,
                                         InstanceAlreadyExistsException,
                                         MalformedObjectNameException

  Throws:
    `NotCompliantMBeanException`
    `MBeanRegistrationException`
    `InstanceAlreadyExistsException`
    `MalformedObjectNameException`

### registerMuleService

    protected void registerMuleService()
                                throws NotCompliantMBeanException,
                                       MBeanRegistrationException,
                                       InstanceAlreadyExistsException,
                                       MalformedObjectNameException

  Throws:
    `NotCompliantMBeanException`
    `MBeanRegistrationException`
    `InstanceAlreadyExistsException`
    `MalformedObjectNameException`

### registerConfigurationService

    protected void registerConfigurationService()
                                         throws NotCompliantMBeanException,
                                                MBeanRegistrationException,
                                                InstanceAlreadyExistsException,
                                                MalformedObjectNameException

  Throws:
    `NotCompliantMBeanException`
    `MBeanRegistrationException`
    `InstanceAlreadyExistsException`
    `MalformedObjectNameException`

### registerServiceServices

    protected void registerServiceServices()
                                    throws NotCompliantMBeanException,
                                           MBeanRegistrationException,
                                           InstanceAlreadyExistsException,
                                           MalformedObjectNameException

  Throws:
    `NotCompliantMBeanException`
    `MBeanRegistrationException`
    `InstanceAlreadyExistsException`
    `MalformedObjectNameException`

### registerEndpointServices

    protected void registerEndpointServices()
                                     throws NotCompliantMBeanException,
                                            MBeanRegistrationException,
                                            InstanceAlreadyExistsException,
                                            MalformedObjectNameException

  Throws:
    `NotCompliantMBeanException`
    `MBeanRegistrationException`
    `InstanceAlreadyExistsException`
    `MalformedObjectNameException`

### buildFullyQualifiedEndpointName

    protected String buildFullyQualifiedEndpointName(EndpointServiceMBean mBean,
                                                     Connector connector)

### registerConnectorServices

    protected void registerConnectorServices()
                                      throws MalformedObjectNameException,
                                             NotCompliantMBeanException,
                                             MBeanRegistrationException,
                                             InstanceAlreadyExistsException

  Throws:
    `MalformedObjectNameException`
    `NotCompliantMBeanException`
    `MBeanRegistrationException`
    `InstanceAlreadyExistsException`

### isCreateServer

    public boolean isCreateServer()

### setCreateServer

    public void setCreateServer(boolean createServer)

### isLocateServer

    public boolean isLocateServer()

### setLocateServer

    public void setLocateServer(boolean locateServer)

### getConnectorServerUrl

    public String getConnectorServerUrl()

### setConnectorServerUrl

    public void setConnectorServerUrl(String connectorServerUrl)

### isEnableStatistics

    public boolean isEnableStatistics()

### setEnableStatistics

    public void setEnableStatistics(boolean enableStatistics)

### getMBeanServer

    public MBeanServer getMBeanServer()

### setMBeanServer

    public void setMBeanServer(MBeanServer mBeanServer)

### getConnectorServerProperties

    public Map<String,Object> getConnectorServerProperties()

### setConnectorServerProperties

    public void setConnectorServerProperties(Map<String,Object> connectorServerProperties)

  Setter for property 'connectorServerProperties'. Set to `null` to use defaults (`DEFAULT_CONNECTOR_SERVER_PROPERTIES`). Pass in an empty map to use no parameters. Passing a non-empty map will replace defaults.

  Parameters:
    `connectorServerProperties` - Value to set for property 'connectorServerProperties'.

### getJmxSupportFactory

    public JmxSupportFactory getJmxSupportFactory()

### setJmxSupportFactory

    public void setJmxSupportFactory(JmxSupportFactory jmxSupportFactory)

### setCredentials

    public void setCredentials(Map<String,String> newCredentials)

  Setter for property 'credentials'.

  Parameters:
    `newCredentials` - Value to set for property 'credentials'.

### unregisterMBeansIfNecessary

    protected void unregisterMBeansIfNecessary()

### unregisterMBeansIfNecessary

    protected void unregisterMBeansIfNecessary(boolean containerMode)

  Parameters:
    `containerMode` - when true, MuleContext will still be exposed to enable the 'start' operation

### getRmiRegistry

    public Registry getRmiRegistry()

### setRmiRegistry

    public void setRmiRegistry(Registry rmiRegistry)

### isCreateRmiRegistry

    public boolean isCreateRmiRegistry()

### setCreateRmiRegistry

    public void setCreateRmiRegistry(boolean createRmiRegistry)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.