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 theObjectName
for 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.TenantAwareExecutor
to control the activation of the tenants.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
AbstractJMXMBean.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 void
activateTenant()
Activates the tenant which was active when registering the current bean.void
afterPropertiesSet()
protected void
deactivateTenant()
Deactivate the current tenant for the current MBean.java.lang.Class
getBeanInterface()
interface type for jmx bean apijavax.management.ObjectName
getObjectName()
Returns aObjectName
and catches exceptions if any occures.protected boolean
isJNDIContextAware()
void
setBeanInterface(java.lang.Class beanInterface)
interface type for jmx bean apivoid
setJmxPath(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:
afterPropertiesSet
in 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.NullPointerException
Returns aObjectName
and catches exceptions if any occures.- Returns:
null
if any exception happend.- Throws:
java.lang.NullPointerException
javax.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:
setJmxPath
in 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
-
-