Serializable
, Cloneable
, DescriptorAccess
, DescriptorRead
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.
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 the currencyTimeLimit
field. To indicate that it is always valid, use a very large number for this field.
The serialVersionUID of this class is 6532732096650090465L
.
ACTION, ACTION_INFO, INFO, UNKNOWN
description, name
Constructor | Description |
---|---|
ModelMBeanOperationInfo |
Constructs a ModelMBeanOperationInfo object with a default descriptor. |
ModelMBeanOperationInfo |
Constructs a ModelMBeanOperationInfo object. |
ModelMBeanOperationInfo |
Constructs a ModelMBeanOperationInfo object with a default descriptor. |
ModelMBeanOperationInfo |
Constructs a ModelMBeanOperationInfo object. |
ModelMBeanOperationInfo |
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 |
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. |
equals, getImpact, getReturnType, getSignature
getDescription, getName
public ModelMBeanOperationInfo(String description, Method operationMethod)
Descriptor
of the constructed object will include fields contributed by any annotations on the Method
object that contain the DescriptorKey
meta-annotation.description
- A human readable description of the operation.operationMethod
- The java.lang.reflect.Method object describing the MBean operation.public ModelMBeanOperationInfo(String description, Method operationMethod, Descriptor descriptor)
Descriptor
of the constructed object will include fields contributed by any annotations on the Method
object that contain the DescriptorKey
meta-annotation.description
- A human readable description of the operation.operationMethod
- The java.lang.reflect.Method object describing the MBean operation.descriptor
- An instance of Descriptor containing the appropriate metadata for this instance of the ModelMBeanOperationInfo. If it is null a default descriptor will be created. If the descriptor does not contain the fields "displayName" or "role", the missing ones are added with their default values.RuntimeOperationsException
- Wraps an IllegalArgumentException. The descriptor is invalid; or descriptor field "name" is not equal to operation name; or descriptor field "DescriptorType" is not equal to "operation"; or descriptor optional field "role" is present but not equal to "operation", "getter", or "setter".public ModelMBeanOperationInfo(String name, String description, MBeanParameterInfo[] signature, String type, int impact)
name
- The name of the method.description
- A human readable description of the operation.signature
- MBeanParameterInfo objects describing the parameters(arguments) of the method.type
- The type of the method's return value.impact
- The impact of the method, one of INFO, ACTION, ACTION_INFO, UNKNOWN.public ModelMBeanOperationInfo(String name, String description, MBeanParameterInfo[] signature, String type, int impact, Descriptor descriptor)
name
- The name of the method.description
- A human readable description of the operation.signature
- MBeanParameterInfo objects describing the parameters(arguments) of the method.type
- The type of the method's return value.impact
- The impact of the method, one of INFO, ACTION, ACTION_INFO, UNKNOWN.descriptor
- An instance of Descriptor containing the appropriate metadata for this instance of the MBeanOperationInfo. If it is null then a default descriptor will be created. If the descriptor does not contain fields "displayName" or "role", the missing ones are added with their default values.RuntimeOperationsException
- Wraps an IllegalArgumentException. The descriptor is invalid; or descriptor field "name" is not equal to operation name; or descriptor field "DescriptorType" is not equal to "operation"; or descriptor optional field "role" is present but not equal to "operation", "getter", or "setter".public ModelMBeanOperationInfo(ModelMBeanOperationInfo inInfo)
inInfo
- the ModelMBeanOperationInfo to be duplicatedpublic Object clone()
clone
in class MBeanOperationInfo
public Descriptor getDescriptor()
getDescriptor
in interface DescriptorRead
getDescriptor
in class MBeanFeatureInfo
public void setDescriptor(Descriptor inDescriptor)
setDescriptor
in interface DescriptorAccess
inDescriptor
- replaces the Descriptor associated with the ModelMBeanOperation.RuntimeOperationsException
- Wraps an IllegalArgumentException for invalid Descriptor.public String toString()
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.management/javax/management/modelmbean/ModelMBeanOperationInfo.html