Top Description Fields Constructors Methods
org.h2.jmx

public Class DocumentedMBean

extends StandardMBean
Class Inheritance
Imports
java.io.ByteArrayInputStream, .IOException, java.util.Properties, javax.management.MBeanAttributeInfo, .MBeanInfo, .MBeanOperationInfo, .NotCompliantMBeanException, .StandardMBean, org.h2.util.Utils

An MBean that reads the documentation from a resource file.

Field Summary

Modifier and TypeField and Description
private final String
private Properties

Constructor Summary

AccessConstructor and Description
public <
bean type
T
>
DocumentedMBean(T
bean implementation
impl
,
Class<T>
bean interface class
mbeanInterface
)

Constructor

Method Summary

Modifier and TypeMethod and Description
protected String
getDescription(MBeanInfo
The default MBeanInfo derived by reflection.
info
)

Overrides javax.management.StandardMBean.getDescription.

Customization hook: Get the description that will be used in the MBeanInfo returned by this MBean.

protected String
getDescription(MBeanOperationInfo
The default MBeanOperationInfo derived by reflection.
op
)

Overrides javax.management.StandardMBean.getDescription.

Customization hook: Get the description that will be used in the MBeanOperationInfo returned by this MBean.

protected String
getDescription(MBeanAttributeInfo
The default MBeanAttributeInfo derived by reflection.
info
)

Overrides javax.management.StandardMBean.getDescription.

Customization hook: Get the description that will be used in the MBeanAttributeInfo returned by this MBean.

protected int
getImpact(MBeanOperationInfo
The default MBeanOperationInfo derived by reflection.
info
)

Overrides javax.management.StandardMBean.getImpact.

Customization hook: Get the impact flag of the operation that will be used in the MBeanOperationInfo returned by this MBean.

private Properties
Inherited from javax.management.StandardMBean:
cacheMBeanInfogetAttributegetAttributesgetCachedMBeanInfogetClassNamegetConstructorsgetDescriptiongetDescriptiongetDescriptiongetDescriptiongetImplementationgetImplementationClassgetMBeanInfogetMBeanInterfacegetParameterNamegetParameterNameinvokepostDeregisterpostRegisterpreDeregisterpreRegistersetAttributesetAttributessetImplementation

Field Detail

interfaceNameback to summary
private final String interfaceName
resourcesback to summary
private Properties resources

Constructor Detail

DocumentedMBeanback to summary
public <T> DocumentedMBean(T impl, Class<T> mbeanInterface) throws NotCompliantMBeanException

Constructor

Parameters
<T>
bean type
impl:T

bean implementation

mbeanInterface:Class<T>

bean interface class

Exceptions
NotCompliantMBeanException:
if the mbeanInterface does not follow JMX design patterns for Management Interfaces, or if the given implementation does not implement the specified interface.

Method Detail

getDescriptionback to summary
protected String getDescription(MBeanInfo info)

Overrides javax.management.StandardMBean.getDescription.

Doc from javax.management.StandardMBean.getDescription.

Customization hook: Get the description that will be used in the MBeanInfo returned by this MBean.
Subclasses may redefine this method in order to supply their custom MBean description. The default implementation returns info.getDescription().

Parameters
info:MBeanInfo

The default MBeanInfo derived by reflection.

Returns:String

the description for the new MBeanInfo.

Annotations
@Override
getDescriptionback to summary
protected String getDescription(MBeanOperationInfo op)

Overrides javax.management.StandardMBean.getDescription.

Doc from javax.management.StandardMBean.getDescription.

Customization hook: Get the description that will be used in the MBeanOperationInfo returned by this MBean.
Subclasses may redefine this method in order to supply their custom description. The default implementation returns getDescription((MBeanFeatureInfo) info).

Parameters
op:MBeanOperationInfo

The default MBeanOperationInfo derived by reflection.

Returns:String

the description for the given MBeanOperationInfo.

Annotations
@Override
getDescriptionback to summary
protected String getDescription(MBeanAttributeInfo info)

Overrides javax.management.StandardMBean.getDescription.

Doc from javax.management.StandardMBean.getDescription.

Customization hook: Get the description that will be used in the MBeanAttributeInfo returned by this MBean.

Subclasses may redefine this method in order to supply their custom description. The default implementation returns getDescription((MBeanFeatureInfo) info).

Parameters
info:MBeanAttributeInfo

The default MBeanAttributeInfo derived by reflection.

Returns:String

the description for the given MBeanAttributeInfo.

Annotations
@Override
getImpactback to summary
protected int getImpact(MBeanOperationInfo info)

Overrides javax.management.StandardMBean.getImpact.

Doc from javax.management.StandardMBean.getImpact.

Customization hook: Get the impact flag of the operation that will be used in the MBeanOperationInfo returned by this MBean.
Subclasses may redefine this method in order to supply their custom impact flag. The default implementation returns info.getImpact().

Parameters
info:MBeanOperationInfo

The default MBeanOperationInfo derived by reflection.

Returns:int

the impact flag for the given MBeanOperationInfo.

Annotations
@Override
getResourcesback to summary
private Properties getResources()