ModelMBeanOperationInfo (Java SE 15 & JDK 15) (original) (raw)

All Implemented Interfaces:

[Serializable](../../../../java.base/java/io/Serializable.html "interface in java.io"), [Cloneable](../../../../java.base/java/lang/Cloneable.html "interface in java.lang"), [DescriptorAccess](../DescriptorAccess.html "interface in javax.management"), [DescriptorRead](../DescriptorRead.html "interface in javax.management")


public class ModelMBeanOperationInfo extends MBeanOperationInfo implements DescriptorAccess

The ModelMBeanOperationInfo object describes a management operation of the ModelMBean. It is a subclass of MBeanOperationInfo with the addition of an associated Descriptor and an implementation of the DescriptorAccess interface.

The fields in the descriptor are defined, but not limited to, the following. Note that when the Type in this table is Number, a String that is the decimal representation of a Long can also be used.

ModelMBeanOperationInfo Fields

Name Type Meaning
name String Operation name.
descriptorType String Must be "operation".
class String Class where method is defined (fully qualified).
role String Must be "operation", "getter", or "setter".
targetObject Object Object on which to execute this method.
targetType String type of object reference for targetObject. Can be: ObjectReference | Handle EJBHandle IOR RMIReference.
value Object Cached value for operation.
displayName String Human readable display name of the operation.
currencyTimeLimit Number How long cached value is valid.
lastUpdatedTimeStamp Number When cached value was set.
visibility Number 1-4 where 1: always visible 4: rarely visible.
presentationString String XML formatted string to describe how to present operation

The default descriptor will have name, descriptorType, displayName and role fields set. The default value of the name and displayName fields is the operation name.

Note: because of inconsistencies in previous versions of this specification, it is recommended not to use negative or zero values for currencyTimeLimit. To indicate that a cached value is never valid, omit thecurrencyTimeLimit field. To indicate that it is always valid, use a very large number for this field.

The serialVersionUID of this class is 6532732096650090465L.

Since:

1.5

See Also:

Serialized Form

Constructors

Constructor Description
ModelMBeanOperationInfo​(String description,Method operationMethod) Constructs a ModelMBeanOperationInfo object with a default descriptor.
ModelMBeanOperationInfo​(String description,Method operationMethod,Descriptor descriptor) Constructs a ModelMBeanOperationInfo object.
ModelMBeanOperationInfo​(String name,String description,MBeanParameterInfo[] signature,String type, int impact) Constructs a ModelMBeanOperationInfo object with a default descriptor.
ModelMBeanOperationInfo​(String name,String description,MBeanParameterInfo[] signature,String type, int impact,Descriptor descriptor) Constructs a ModelMBeanOperationInfo object.
ModelMBeanOperationInfo​(ModelMBeanOperationInfo inInfo) Constructs a new ModelMBeanOperationInfo object from this ModelMBeanOperation Object.
Modifier and Type Method Description
Object clone() Creates and returns a new ModelMBeanOperationInfo which is a duplicate of this ModelMBeanOperationInfo.
Descriptor getDescriptor() Returns a copy of the associated Descriptor of the ModelMBeanOperationInfo.
void setDescriptor​(Descriptor inDescriptor) Sets associated Descriptor (full replace) for the ModelMBeanOperationInfo If the new Descriptor is null, then the associated Descriptor reverts to a default descriptor.
String toString() Returns a string containing the entire contents of the ModelMBeanOperationInfo in human readable form.