Class MBeanExporterWithUnregisterImpl

  • All Implemented Interfaces:
    MBeanExporterWithUnregister, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.SmartInitializingSingleton, org.springframework.jmx.export.MBeanExportOperations

    public class MBeanExporterWithUnregisterImpl
    extends org.springframework.jmx.export.MBeanExporter
    implements MBeanExporterWithUnregister
    Extends Spring's MBeanExporter to provide server state checks around any JMX registration changes.
    • Field Summary

      • Fields inherited from class org.springframework.jmx.export.MBeanExporter

        AUTODETECT_ALL, AUTODETECT_ASSEMBLER, AUTODETECT_MBEAN, AUTODETECT_NONE
      • Fields inherited from class org.springframework.jmx.support.MBeanRegistrationSupport

        logger, server
    • Constructor Summary

      Constructors 
      Constructor Description
      MBeanExporterWithUnregisterImpl​(com.atlassian.event.api.EventPublisher eventPublisher, com.atlassian.tenancy.api.TenantAccessor tenantAccessor)  
    • Constructor Detail

      • MBeanExporterWithUnregisterImpl

        public MBeanExporterWithUnregisterImpl​(com.atlassian.event.api.EventPublisher eventPublisher,
                                               com.atlassian.tenancy.api.TenantAccessor tenantAccessor)
    • Method Detail

      • isEnabled

        public boolean isEnabled()
        Description copied from interface: MBeanExporterWithUnregister
        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.
        Specified by:
        isEnabled in interface MBeanExporterWithUnregister
        Returns:
        true if enabled
      • afterPropertiesSet

        public void afterPropertiesSet()
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Overrides:
        afterPropertiesSet in class org.springframework.jmx.export.MBeanExporter
      • destroy

        public void destroy()
        Specified by:
        destroy in interface org.springframework.beans.factory.DisposableBean
        Overrides:
        destroy in class org.springframework.jmx.export.MBeanExporter
      • unregisterManagedResource

        public void unregisterManagedResource​(ObjectName objectName)
        Specified by:
        unregisterManagedResource in interface org.springframework.jmx.export.MBeanExportOperations
        Overrides:
        unregisterManagedResource in class org.springframework.jmx.export.MBeanExporter
      • registerManagedResource

        public void registerManagedResource​(Object o,
                                            ObjectName objectName)
                                     throws org.springframework.jmx.export.MBeanExportException
        Specified by:
        registerManagedResource in interface org.springframework.jmx.export.MBeanExportOperations
        Overrides:
        registerManagedResource in class org.springframework.jmx.export.MBeanExporter
        Throws:
        org.springframework.jmx.export.MBeanExportException