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
Fields Modifier and Type Field Description static String
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
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description boolean
isEnabled()
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.
-
-
-
Field Detail
-
PROPERTY_NAME_JMX_DISABLED
static final String 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:
- 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
@Deprecated void unregisterBean(ObjectName name)
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
boolean isRegistered(ObjectName name)
Determines whether the object has been registered.- Returns:
- true if registered
-
safeRegisterManagedResource
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 objectname
- of the resource
-
-