Class Info<T>
- Type Parameters:
T- Type of custom delegate produced by custom delegate factories
- All Implemented Interfaces:
DynamicMBean,MBeanRegistration,BaseObjectNamed,InfoMBean,SelfEmailingMBean
Supported API: true
Extendable: true
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classSimple class representing a triplet of an ObjectName, attribute name, and (optional) display name. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddInfoItem(ObjectName mbeanObjectName, String mbeanAttributeName, String displayName, boolean allowNullObjectName) Construct Item object from data specified and append it to list of Items.Deprecated.Deprecated.Deprecated.Returns list of custom delegates.protected voidgetInfoData(ObjectName defaultObjectName, List<Info.Item> outputItems, List<Collection<ObjectName>> outputObjectNameCollList, List<Object> outputValueList) Collects MBean data specified by current set of Item objects.protected String[]getInfoItemsPreview(ObjectName defaultObjectName) Same as getInfoItemsPreview() but is given a default ObjectName for cases in which an ObjectName was left unspecified.protected voidinsertInfoItem(int idx, ObjectName mbeanObjectName, String mbeanAttributeName, String displayName, boolean allowNullObjectName) Construct Item object from data specified and insert it into list of Items.protected voidsetCustomDelegateFactoryClass(String customDelegateFactoryClassname, Class requiredBaseClass) Deprecated.Methods inherited from class wt.jmx.core.SelfAwareMBean
deregister, destroy, getBaseObjectName, getObjectName, getObjectNameOnPreRegister, getObjectNameSuffix, getOwnerMBean, getRegisteredMBeanIterator, getSelfAwareMBean, init, isAutoStart, isInited, isRegistered, isStarted, postDeregister, postRegister, preDeregister, preRegister, register, register, register, resetObjectName, setAutoStart, setOwnerMBean, start, stopMethods inherited from class wt.jmx.core.StandardMBean
cacheMBeanInfo, cacheMBeanInfoInInstance, emailThisMBean, getAttributes, getCachedInstanceMBeanInfo, getCachedMBeanInfo, getDescription, getDescription, getDescription, getDescription, getImpact, getMBeanInfo, getParameterName, setAttributes, sortMethods inherited from class javax.management.StandardMBean
getAttribute, getClassName, getConstructors, getDescription, getDescription, getDescription, getImplementation, getImplementationClass, getMBeanInterface, getParameterName, invoke, setAttribute, setImplementationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface wt.jmx.core.mbeans.SelfEmailingMBean
emailThisMBean
-
Constructor Details
-
Info
Constructor.
Supported API: true- Parameters:
mbeanInterface- Interface of MBean- Throws:
NotCompliantMBeanException
-
Info
Constructor.
Supported API: true- Parameters:
mbeanInterface- Interface of MBeanrequiredBaseClass- Class custom delegate factories must be instances of- Throws:
NotCompliantMBeanException
-
-
Method Details
-
getCustomDelegates
Returns list of custom delegates. [For use by subclasses.]
Supported API: true -
getInfoItemsPreview
Same as getInfoItemsPreview() but is given a default ObjectName for cases in which an ObjectName was left unspecified.
Supported API: true -
getInfoData
protected void getInfoData(ObjectName defaultObjectName, List<Info.Item> outputItems, List<Collection<ObjectName>> outputObjectNameCollList, List<Object> outputValueList) Collects MBean data specified by current set of Item objects. All lists arguments are for output purposes and are populated with output data in parallel with one another except in cases where 'null' is passed, in which case no data is returned for the given argument (obviously).
Supported API: true- Parameters:
defaultObjectName- ObjectName to use in cases where an Item does not specify an ObjectNameoutputItems- populated with current Item objectsoutputObjectNameCollList- populated with ObjectNames indicated by each Item appended to outputItemsoutputValueList- populated with attribute values corresponding to each Item appended to outputItems
-
insertInfoItem
protected void insertInfoItem(int idx, ObjectName mbeanObjectName, String mbeanAttributeName, String displayName, boolean allowNullObjectName) Construct Item object from data specified and insert it into list of Items. If 'allowNullObjectName' is true, then allow 'mbeanObjectName' to be null, otherwise throw a NullPointerException if it is null.
Supported API: true -
addInfoItem
protected void addInfoItem(ObjectName mbeanObjectName, String mbeanAttributeName, String displayName, boolean allowNullObjectName) Construct Item object from data specified and append it to list of Items. If 'allowNullObjectName' is true, then allow 'mbeanObjectName' to be null, otherwise throw a NullPointerException if it is null.
Supported API: true -
getCustomDelegateFactoryClass
Deprecated.Returns name of custom delegate factory class.This method is retained purely for backwards compatibility and should no longer be used. It may either obtain the class name of the first delegate factory by an undefined internal iterator ordering or simply throw a runtime exception when there are multiple custom delegate factories specified.
Supported API: true- Specified by:
getCustomDelegateFactoryClassin interfaceInfoMBean
-
setCustomDelegateFactoryClass
@Deprecated protected void setCustomDelegateFactoryClass(String customDelegateFactoryClassname, Class requiredBaseClass) throws ClassCastException, ClassNotFoundException, IllegalAccessException, InstantiationException Deprecated.Sets custom delegate factory class (removing all other factory instances) and using the class name as the factory name.Though the factory is set by class name, an instance is created and held for re-use. It is also persisted, assuming the instance can be persisted via
XMLEncoder. Finally, if the factory instance extends SelfAwareMBean then it is registered as a MBean child of this MBean and managed as such throughout the lifecycle of this MBean.This method is retained purely for backwards compatibility and should no longer be used.
Supported API: true- Parameters:
customDelegateFactoryClassname- Name of custom delegate factory classrequiredBaseClass- Class delegate factory class is required to implement or extend- Throws:
ClassCastExceptionClassNotFoundExceptionIllegalAccessExceptionInstantiationException
-
getCustomDelegateFactory
Deprecated.Returns instance of a custom delegate factory or null if no custom delegates have been specified.This method is retained purely for backwards compatibility and should no longer be used. It may either obtain the first delegate factory by an undefined internal iterator ordering or simply throw a runtime exception when there are multiple custom delegate factories specified.
Supported API: true -
getCustomDelegate
Deprecated.Return custom delegate produced by a custom delegate factory's getInstance() method or null if no custom delegates have been specified.This method is retained purely for backwards compatibility and should no longer be used. It may either obtain a delegate from the first delegate factory by an undefined internal iterator ordering or simply throw a runtime exception when there are multiple custom delegate factories specified.
Supported API: true
-