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
.
Modifier and Type | Field and Description |
---|---|
private static boolean | |
private static final String | |
private static final ObjectStreamField[] | |
private static final long | |
private static final ObjectStreamField[] | |
private static final long | |
private Descriptor | |
private static final ObjectStreamField[] | |
private static final long |
Access | Constructor and Description |
---|---|
public | ModelMBeanOperationInfo(String
A human readable description of the operation. description, Method The java.lang.reflect.Method object
describing the MBean operation. operationMethod)Constructs a ModelMBeanOperationInfo object with a default descriptor. |
public | ModelMBeanOperationInfo(String
A human readable description of the
operation. description, Method The java.lang.reflect.Method object
describing the MBean operation. operationMethod, 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. descriptor)Constructs a ModelMBeanOperationInfo object. |
public | ModelMBeanOperationInfo(String
The name of the method. name, String A human readable description of the operation. description, MBeanParameterInfo[] MBeanParameterInfo objects describing the
parameters(arguments) of the method. signature, String The type of the method's return value. type, int The impact of the method, one of INFO, ACTION,
ACTION_INFO, UNKNOWN. impact)Constructs a ModelMBeanOperationInfo object with a default descriptor. |
public | ModelMBeanOperationInfo(String
The name of the method. name, String A human readable description of the operation. description, MBeanParameterInfo[] MBeanParameterInfo objects describing the
parameters(arguments) of the method. signature, String The type of the method's return value. type, int The impact of the method, one of INFO, ACTION,
ACTION_INFO, UNKNOWN. impact, 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. descriptor)Constructs a ModelMBeanOperationInfo object. |
public | ModelMBeanOperationInfo(ModelMBeanOperationInfo
the ModelMBeanOperationInfo to be duplicated inInfo)Constructs a new ModelMBeanOperationInfo object from this ModelMBeanOperation Object. |
Modifier and Type | Method and Description |
---|---|
public Object | clone()
Overrides javax. Creates and returns a new ModelMBeanOperationInfo which is a duplicate of this ModelMBeanOperationInfo. |
public Descriptor | Returns: Descriptor associated with the ModelMBeanOperationInfo object.Overrides javax. Implements javax. Returns a copy of the associated Descriptor of the ModelMBeanOperationInfo. |
private void | readObject(ObjectInputStream in)
Hides javax. Deserializes a |
public void | setDescriptor(Descriptor
replaces the Descriptor associated with the
ModelMBeanOperation. inDescriptor)Implements javax. Sets associated Descriptor (full replace) for the ModelMBeanOperationInfo If the new Descriptor is null, then the associated Descriptor reverts to a default descriptor. |
public String | toString()
Overrides javax. Returns a string containing the entire contents of the ModelMBeanOperationInfo in human readable form. |
private Descriptor | validDescriptor(final Descriptor
Descriptor to be checked, or null which is equivalent to
an empty Descriptor. in)Clones the passed in Descriptor, sets default values, and checks for validity. |
private void | writeObject(ObjectOutputStream out)
Hides javax. Serializes a |
compat | back to summary |
---|---|
private static boolean compat |
currClass | back to summary |
---|---|
private static final String currClass |
newSerialPersistentFields | back to summary |
---|---|
private static final ObjectStreamField[] newSerialPersistentFields |
newSerialVersionUID | back to summary |
---|---|
private static final long newSerialVersionUID |
oldSerialPersistentFields | back to summary |
---|---|
private static final ObjectStreamField[] oldSerialPersistentFields |
oldSerialVersionUID | back to summary |
---|---|
private static final long oldSerialVersionUID |
operationDescriptor | back to summary |
---|---|
private Descriptor operationDescriptor |
serialPersistentFields | back to summary |
---|---|
private static final ObjectStreamField[] serialPersistentFields
|
serialVersionUID | back to summary |
---|---|
private static final long serialVersionUID |
ModelMBeanOperationInfo | back to summary |
---|---|
public ModelMBeanOperationInfo(String description, Method operationMethod) Constructs a ModelMBeanOperationInfo object with a default
descriptor. The |
ModelMBeanOperationInfo | back to summary |
---|---|
public ModelMBeanOperationInfo(String description, Method operationMethod, Descriptor descriptor) Constructs a ModelMBeanOperationInfo object. The
|
ModelMBeanOperationInfo | back to summary |
---|---|
public ModelMBeanOperationInfo(String name, String description, MBeanParameterInfo[] signature, String type, int impact) Constructs a ModelMBeanOperationInfo object with a default descriptor.
|
ModelMBeanOperationInfo | back to summary |
---|---|
public ModelMBeanOperationInfo(String name, String description, MBeanParameterInfo[] signature, String type, int impact, Descriptor descriptor) Constructs a ModelMBeanOperationInfo object.
|
ModelMBeanOperationInfo | back to summary |
---|---|
public ModelMBeanOperationInfo(ModelMBeanOperationInfo inInfo) Constructs a new ModelMBeanOperationInfo object from this ModelMBeanOperation Object.
|
clone | back to summary |
---|---|
public Object clone() Overrides javax. Creates and returns a new ModelMBeanOperationInfo which is a duplicate of this ModelMBeanOperationInfo.
|
getDescriptor | back to summary |
---|---|
public Descriptor getDescriptor() Overrides javax. Implements javax. Returns a copy of the associated Descriptor of the ModelMBeanOperationInfo.
|
readObject | back to summary |
---|---|
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException Hides javax. Deserializes a |
setDescriptor | back to summary |
---|---|
public void setDescriptor(Descriptor inDescriptor) Implements javax. Sets associated Descriptor (full replace) for the ModelMBeanOperationInfo If the new Descriptor is null, then the associated Descriptor reverts to a default descriptor. The Descriptor is validated before it is assigned. If the new Descriptor is invalid, then a RuntimeOperationsException wrapping an IllegalArgumentException is thrown.
|
toString | back to summary |
---|---|
public String toString() Overrides javax. Returns a string containing the entire contents of the ModelMBeanOperationInfo in human readable form.
|
validDescriptor | back to summary |
---|---|
private Descriptor validDescriptor(final Descriptor in) throws RuntimeOperationsException Clones the passed in Descriptor, sets default values, and checks for validity. If the Descriptor is invalid (for instance by having the wrong "name"), this indicates programming error and a RuntimeOperationsException will be thrown. The following fields will be defaulted if they are not already set: displayName=this.getName(),name=this.getName(), descriptorType="operation", role="operation"
|
writeObject | back to summary |
---|---|
private void writeObject(ObjectOutputStream out) throws IOException Hides javax. Serializes a |