Package 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.
- Determining whether or not this Exporter is enabled
- The ability for the Exporter to unregister beans
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Setting this system property to true will prevent the exporter from registering or unregistering MBeans, and causeisEnabled()
to always return false -
Method Summary
Modifier and TypeMethodDescriptionboolean
Determines whether or not the export is enabled.boolean
isRegistered
(ObjectName name) Determines whether the object has been registered.void
safeRegisterManagedResource
(Object value, ObjectName name) Registers the MBean with a given name.void
unregisterBean
(ObjectName name) Deprecated.since 5.10.Methods inherited from interface org.springframework.jmx.export.MBeanExportOperations
registerManagedResource, registerManagedResource, unregisterManagedResource
-
Field Details
-
PROPERTY_NAME_JMX_DISABLED
Setting this system property to true will prevent the exporter from registering or unregistering MBeans, and causeisEnabled()
to always return false- See Also:
-
-
Method Details
-
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
Deprecated.since 5.10. UseMBeanExportOperations.unregisterManagedResource(javax.management.ObjectName)
instead.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
Determines whether the object has been registered.- Returns:
- true if registered
-
safeRegisterManagedResource
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 objectname
- of the resource
-