Class AbstractJMXMBean

java.lang.Object
de.hybris.platform.jmx.mbeans.impl.JMXBindableTenantAwareObject
de.hybris.platform.jmx.mbeans.impl.AbstractJMXMBean
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
Direct Known Subclasses:
CronJobsInfoMBeanImpl, DatabaseOverviewMBeanImpl, FlexibleQueryMBeanImpl, MainCacheMBeanImpl, QueueInfoBeanImpl, RegionCacheMBeanImpl

public abstract class AbstractJMXMBean extends JMXBindableTenantAwareObject implements org.springframework.beans.factory.InitializingBean
The hybris JMX MBean. All MBeans must extends this class. This class deals with the tenant awareness, the creation of the ObjectName for each MBean ans provides methods for activating and deactivating the tenant. Please use activateTenant() and deactivateTenant() when trying to access tenant related informations.

Use activateTenant() and deactivateTenant() or the inner class AbstractJMXMBean.TenantAwareExecutor to control the activation of the tenants.

  • Constructor Details

    • AbstractJMXMBean

      public AbstractJMXMBean()
  • Method Details

    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • activateTenant

      protected void activateTenant()
      Activates the tenant which was active when registering the current bean.
    • deactivateTenant

      protected void deactivateTenant()
      Deactivate the current tenant for the current MBean.
    • getObjectName

      Returns a ObjectName and catches exceptions if any occures.
      Returns:
      null if any exception happend.
      Throws:
      NullPointerException
      MalformedObjectNameException
    • isJNDIContextAware

      protected boolean isJNDIContextAware()
    • setJmxPath

      public void setJmxPath(String jmxPath)
      Injected by Spring as mandatory attribute. The path should be in the following style: key1=value1, key2=value2. Each key/value pair is one level in the jconsole. The last key/value pair is the node itself. Must not return an empty String!
      Overrides:
      setJmxPath in class JMXBindableTenantAwareObject
    • setBeanInterface

      public void setBeanInterface(Class beanInterface)
      interface type for jmx bean api
    • getBeanInterface

      public Class getBeanInterface()
      interface type for jmx bean api