public class

MBeanExporterWithUnregisterImpl

extends MBeanExporter
implements MBeanExporterWithUnregister
java.lang.Object
   ↳ org.springframework.jmx.support.MBeanRegistrationSupport
     ↳ org.springframework.jmx.export.MBeanExporter
       ↳ com.atlassian.confluence.jmx.MBeanExporterWithUnregisterImpl

Class Overview

Extends Spring's MBeanExporter to provide an unregister operation (which for some reason they don't have).

Summary

[Expand]
Inherited Constants
From class org.springframework.jmx.export.MBeanExporter
From class org.springframework.jmx.support.MBeanRegistrationSupport
From interface com.atlassian.confluence.jmx.MBeanExporterWithUnregister
[Expand]
Inherited Fields
From class org.springframework.jmx.support.MBeanRegistrationSupport
Public Constructors
MBeanExporterWithUnregisterImpl()
Public Methods
void afterPropertiesSet()
boolean isEnabled()
Determines whether or not the export is enabled.
boolean isRegistered(ObjectName name)
Determines whether the object has been registered.
void registerManagedResource(Object o, ObjectName objectName)
void safeRegisterManagedResource(Object value, ObjectName name)
Registers the MBean with a given name.
void setEnabled(boolean enabled)
void unregisterBean(ObjectName name)
Unregistered the MBean with the given name.
[Expand]
Inherited Methods
From class org.springframework.jmx.export.MBeanExporter
From class org.springframework.jmx.support.MBeanRegistrationSupport
From class java.lang.Object
From interface com.atlassian.confluence.jmx.MBeanExporterWithUnregister
From interface org.springframework.beans.factory.BeanClassLoaderAware
From interface org.springframework.beans.factory.BeanFactoryAware
From interface org.springframework.beans.factory.DisposableBean
From interface org.springframework.beans.factory.InitializingBean
From interface org.springframework.jmx.export.MBeanExportOperations

Public Constructors

public MBeanExporterWithUnregisterImpl ()

Public Methods

public void afterPropertiesSet ()

public boolean isEnabled ()

Determines whether or not the export is enabled. If not enabled, the Exporter will not be able to register or unregister any MBeans. If the system property "confluence.jmx.disabled" is set to true, this method will always return false.

Returns
  • true if enabled

public boolean isRegistered (ObjectName name)

Determines whether the object has been registered.

Returns
  • true if registered

public void registerManagedResource (Object o, ObjectName objectName)

Throws
MBeanExportException

public void safeRegisterManagedResource (Object value, ObjectName name)

Registers the MBean with a given name. If a duplicate MBean is found the object will be overwritten and any other errors logged and swallowed.

Parameters
value - MBean object
name of the resource

public void setEnabled (boolean enabled)

public void unregisterBean (ObjectName name)

Unregistered the MBean with the given name. This means that it will no longer be managed by the JMX agent.

Parameters
name of the resource to be unregistered.