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,JCoConnectionClusterMBeanImpl,JCoConnectionMBeanImpl,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 theObjectNamefor each MBean ans provides methods for activating and deactivating the tenant. Please useactivateTenant()anddeactivateTenant()when trying to access tenant related informations. UseactivateTenant()anddeactivateTenant()or the inner classAbstractJMXMBean.TenantAwareExecutorto control the activation of the tenants.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classAbstractJMXMBean.TenantAwareExecutor<T>Inner tenant aware executor class.
-
Constructor Summary
Constructors Constructor Description AbstractJMXMBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidactivateTenant()Activates the tenant which was active when registering the current bean.voidafterPropertiesSet()protected voiddeactivateTenant()Deactivate the current tenant for the current MBean.java.lang.ClassgetBeanInterface()interface type for jmx bean apijavax.management.ObjectNamegetObjectName()Returns aObjectNameand catches exceptions if any occures.protected booleanisJNDIContextAware()voidsetBeanInterface(java.lang.Class beanInterface)interface type for jmx bean apivoidsetJmxPath(java.lang.String jmxPath)Injected by Spring as mandatory attribute.-
Methods inherited from class de.hybris.platform.jmx.mbeans.impl.JMXBindableTenantAwareObject
getJmxDomain, getJmxPath, getObjectNameString, getTenantId, setTenant
-
-
-
-
Method Detail
-
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
java.lang.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
public javax.management.ObjectName getObjectName() throws javax.management.MalformedObjectNameException, java.lang.NullPointerExceptionReturns aObjectNameand catches exceptions if any occures.- Returns:
nullif any exception happend.- Throws:
java.lang.NullPointerExceptionjavax.management.MalformedObjectNameException
-
isJNDIContextAware
protected boolean isJNDIContextAware()
-
setJmxPath
public void setJmxPath(java.lang.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:
setJmxPathin classJMXBindableTenantAwareObject
-
setBeanInterface
public void setBeanInterface(java.lang.Class beanInterface)
interface type for jmx bean api
-
getBeanInterface
public java.lang.Class getBeanInterface()
interface type for jmx bean api
-
-