com.atlassian.confluence.jmx
Interface MBeanExporterWithUnregister

All Superinterfaces:
org.springframework.jmx.export.MBeanExportOperations
All Known Implementing Classes:
MBeanExporterWithUnregisterImpl

public interface MBeanExporterWithUnregister
extends org.springframework.jmx.export.MBeanExportOperations

This interface has been created to allow us to perform additional necessary operations that are not provided via Spring's JMX support classes. The following operations have been added.


Field Summary
static java.lang.String PROPERTY_NAME_JMX_DISABLED
          Setting this system property to true will prevent the exporter from registering or unregistering MBeans, and cause isEnabled() to always return false
 
Method Summary
 boolean isEnabled()
          Determines whether or not the export is enabled.
 boolean isRegistered(javax.management.ObjectName name)
          Determines whether the object has been registered.
 void safeRegisterManagedResource(java.lang.Object value, javax.management.ObjectName name)
          Registers the MBean with a given name.
 void unregisterBean(javax.management.ObjectName name)
          Unregistered the MBean with the given name.
 
Methods inherited from interface org.springframework.jmx.export.MBeanExportOperations
registerManagedResource, registerManagedResource
 

Field Detail

PROPERTY_NAME_JMX_DISABLED

static final java.lang.String PROPERTY_NAME_JMX_DISABLED
Setting this system property to true will prevent the exporter from registering or unregistering MBeans, and cause isEnabled() to always return false

See Also:
Constant Field Values
Method Detail

isEnabled

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

unregisterBean

void unregisterBean(javax.management.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.

isRegistered

boolean isRegistered(javax.management.ObjectName name)
Determines whether the object has been registered.

Returns:
true if registered

safeRegisterManagedResource

void safeRegisterManagedResource(java.lang.Object value,
                                 javax.management.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


Copyright © 2003-2013 Atlassian. All Rights Reserved.