org.axonframework.monitoring.jmx
Class JmxConfiguration

java.lang.Object
  extended by org.axonframework.monitoring.jmx.JmxConfiguration

public final class JmxConfiguration
extends Object

Utility class that allows Axon-related components to be configured with an MBeanServer. By default all MBeans are registered with the platform MBean Server using a standard ObjectName.

Since:
0.6
Author:
Jettro Coenradie, Allard Buijze

Method Summary
 void disableMonitoring()
          Disables monitoring.
static JmxConfiguration getInstance()
          Returns the singleton instance of JmxConfiguration.
 void registerMBean(Object mBean, Class<?> monitoredType)
          Attempts to register the given mBean as an MBean with the default MBeanServer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static JmxConfiguration getInstance()
Returns the singleton instance of JmxConfiguration.

Returns:
the JmxConfiguration instance

registerMBean

public void registerMBean(Object mBean,
                          Class<?> monitoredType)
Attempts to register the given mBean as an MBean with the default MBeanServer. If registration fails, no exceptions are thrown. Instead, failure is logged and silently accepted.

Parameters:
mBean - The instance to register as MBean. Note that this instance needs to be MBean compliant. Otherwise, registration fails silently.
monitoredType - The type of object that the MBean represents. This type is used to construct the ObjectName of the MBean.

disableMonitoring

public void disableMonitoring()
Disables monitoring. Any calls to registerMBean(Object, Class) will be ignored.



Copyright © 2011. All Rights Reserved.