|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectwt.jmx.core.StandardMBeanFix
wt.jmx.core.StandardMBean
public class StandardMBean
This class is intended to serve the same purpose as StandardMBean,
and support its public and protected API while addressing some gaps therein.
Specifically, this class provides localized descriptions and operation parameter
names when resource bundles produced by
MBeanProcessorFactory are accessible. It also provides
operation impact when this is conveyed via MBeanOperationImpact
annotations. Further, it provides per-implementation class caching of MBeanInfo
in addition to the per-instance caching provided by StandardMBean.
Finally, it automatically uses the MBeanNotificationInfo produced by getNotificationInfo()
for subclasses that implement NotificationBroadcaster.
Due to these improvements, this class should be used as the basis for all Windchill MBeans
(apart from special cases like DynamicMBeanProxy).
Note: Though it may (or may not) be the case at this moment, no one should assume that this class does (or does not) extend javax.management.StandardMBean. They can rely on this class supporting the public and protected methods exposed by javax.management.StandardMBean and its base classes remaining exposed, however.
Do note, however, that this class explicitly does not support usage of
setImplementation() from one thread while other threads may be calling methods
on the same instance. Specifically, in the case that the instance's MBeanInfo is
should change due to setImplementation() such changes may not occur. The authors
of the JMX spec consider this particular usage scenario ill-advised and supporting
this robustly has adverse performance implications. Therefore this practice is
simply not supported by this class. This class should be considered thread safe as
long as one completes any such use of setImplementation() prior to handing the
instance to other threads, however.
Supported API: true
Extendable: true
| Constructor Summary | |
|---|---|
protected |
StandardMBean(Class mbeanInterface)
Pass through constructor. |
|
StandardMBean(Object implementation,
Class mbeanInterface)
Pass through constructor. |
| Method Summary | |
|---|---|
protected void |
cacheMBeanInfo(MBeanInfo info)
Cache MBeanInfo in this instance and in per implementation class cache as well. |
protected void |
cacheMBeanInfoInInstance(MBeanInfo info)
Exposes javax.management.StandardMBean.cacheMBeanInfo() to subclasses so they can cache their MBeanInfo directly in this instance object without introducing another field. |
protected MBeanInfo |
createMBeanInfo(MBeanInfo baseClassMBeanInfo)
This method is intended for sub-classes to override without worrying about caching policies, etc. |
void |
emailThisMBean(String addressesOrEmailList,
String subject,
boolean includeChildren)
Note this implementation is provided for subclasses, but will not function unless subclassed such that a public getObjectName() method is provided that returns the ObjectName of this MBean and Emailer and Dumper MBeans have been instantiated and started for this MBean to use and are accessible via the local class loader. |
protected MBeanInfo |
getCachedInstanceMBeanInfo()
Exposes javax.management.StandardMBean.getCachedMBeanInfo() to subclasses so they can access cached MBeanInfo directly in this instance object without introducing another field. |
protected MBeanInfo |
getCachedMBeanInfo()
Get cached MBeanInfo. |
protected String |
getDescription(MBeanAttributeInfo info)
See StandardMBean. |
protected String |
getDescription(MBeanInfo info)
See StandardMBean. |
protected String |
getDescription(MBeanOperationInfo info)
See StandardMBean. |
protected String |
getDescription(MBeanOperationInfo op,
MBeanParameterInfo param,
int sequence)
See StandardMBean. |
protected int |
getImpact(MBeanOperationInfo info)
See StandardMBean. |
MBeanInfo |
getMBeanInfo()
Overriden to fix JDK StandardMBean's lack of proper getNotificationInfo() support. |
protected String |
getParameterName(MBeanOperationInfo op,
MBeanParameterInfo param,
int sequence)
See StandardMBean. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StandardMBean(Object implementation,
Class mbeanInterface)
throws NotCompliantMBeanException
NotCompliantMBeanException
protected StandardMBean(Class mbeanInterface)
throws NotCompliantMBeanException
NotCompliantMBeanException| Method Detail |
|---|
public void emailThisMBean(String addressesOrEmailList,
String subject,
boolean includeChildren)
throws Exception
It should be clear that this is really a convenience method for calling Dumper's
emailMBeans() operation (always applying the default XSLT styling and not
compressing) with this MBean's ObjectName and appending ",*" to this if
'includeChildren' is true.
Supported API: true
Exceptionpublic MBeanInfo getMBeanInfo()
Note: To override/augment/amend this MBeanInfo, but still use this classes'
per-class caching strategy, override createMBeanInfo() instead. On the other hand,
to use a different, overlaid caching strategy override this routine and call this
implementation to get the base standard MBean info.
Supported API: true
getMBeanInfo in interface DynamicMBeangetMBeanInfo in class wt.jmx.core.StandardMBeanFixprotected MBeanInfo createMBeanInfo(MBeanInfo baseClassMBeanInfo)
No cache access should be performed herein. Also, in general, the first line of an override of this method should be
baseClassMBeanInfo = super.createMBeanInfo( baseClassMBeanInfo );unless one has a good reason to override additions/adjustments made by super classes.
protected MBeanInfo getCachedInstanceMBeanInfo()
protected MBeanInfo getCachedMBeanInfo()
getCachedMBeanInfo in class wt.jmx.core.StandardMBeanFixprotected void cacheMBeanInfoInInstance(MBeanInfo info)
protected void cacheMBeanInfo(MBeanInfo info)
cacheMBeanInfo in class wt.jmx.core.StandardMBeanFixprotected String getDescription(MBeanInfo info)
StandardMBean.
getDescription in class wt.jmx.core.StandardMBeanFixprotected String getDescription(MBeanAttributeInfo info)
StandardMBean.
getDescription in class wt.jmx.core.StandardMBeanFixprotected String getDescription(MBeanOperationInfo info)
StandardMBean.
getDescription in class wt.jmx.core.StandardMBeanFix
protected String getDescription(MBeanOperationInfo op,
MBeanParameterInfo param,
int sequence)
StandardMBean.
getDescription in class wt.jmx.core.StandardMBeanFix
protected String getParameterName(MBeanOperationInfo op,
MBeanParameterInfo param,
int sequence)
StandardMBean.
getParameterName in class wt.jmx.core.StandardMBeanFixprotected int getImpact(MBeanOperationInfo info)
StandardMBean.
getImpact in class wt.jmx.core.StandardMBeanFix
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||