This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.management.modelmbean
class ModelMBeanOperationInfo

java.lang.Object extended by javax.management.MBeanFeatureInfo extended by javax.management.MBeanOperationInfo extended by javax.management.modelmbean.ModelMBeanOperationInfo
All Implemented Interfaces:
Serializable, Cloneable, DescriptorAccess, DescriptorRead

Most common way to construct:

ModelMBeanInfo info = …;
String name = …;

ModelMBeanOperationInfo opInfo = info.getOperation(name);

Based on 7 examples


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: 
 name           : operation name 
 descriptorType : must be "operation"    
 class          : class where method is defined (fully qualified) 
 role           : must be "operation", "getter", or "setter
 targetObject   : object on which to execute this method          
 targetType     : type of object reference for targetObject. Can be: ObjectReference | Handle | EJBHandle | IOR | RMIReference.
 value          : cached value for operation                   
 currencyTimeLimit : how long cached value is valid               
 lastUpdatedTimeStamp : when cached value was set                
 visibility            : 1-4 where 1: always visible 4: rarely visible 
 presentationString :  xml formatted string to describe how to present operation 
 
The default descriptor will have name, descriptorType, displayName and role fields set.

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.


Field Summary
 
Fields inherited from class javax.management.MBeanOperationInfo
ACTION, ACTION_INFO, INFO, UNKNOWN
 
Fields inherited from class javax.management.MBeanFeatureInfo
description, name
 
Constructor Summary

          Constructs a new ModelMBeanOperationInfo object from this ModelMBeanOperation Object.
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.
 
Method Summary
 Object

          Creates and returns a new ModelMBeanOperationInfo which is a duplicate of this ModelMBeanOperationInfo.
 Descriptor

          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

          Returns a string containing the entire contents of the ModelMBeanOperationInfo in human readable form.
 
Methods inherited from class javax.management.MBeanOperationInfo
clone, equals, getImpact, getReturnType, getSignature, hashCode, toString
 
Methods inherited from class javax.management.MBeanFeatureInfo
equals, getDescription, getDescriptor, getName, hashCode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelMBeanOperationInfo

public ModelMBeanOperationInfo(ModelMBeanOperationInfo inInfo)
Constructs a new ModelMBeanOperationInfo object from this ModelMBeanOperation Object.

Parameters:
inInfo - the ModelMBeanOperationInfo to be duplicated

ModelMBeanOperationInfo

public ModelMBeanOperationInfo(String description,
                               Method operationMethod)
Constructs a ModelMBeanOperationInfo object with a default descriptor. The {@link Descriptor} of the constructed object will include fields contributed by any annotations on the {@code Method} object that contain the {@link DescriptorKey} meta-annotation.

Parameters:
description - A human readable description of the operation.
operationMethod - The java.lang.reflect.Method object describing the MBean operation.

ModelMBeanOperationInfo

public ModelMBeanOperationInfo(String description,
                               Method operationMethod,
                               Descriptor descriptor)
Constructs a ModelMBeanOperationInfo object. The {@link Descriptor} of the constructed object will include fields contributed by any annotations on the {@code Method} object that contain the {@link DescriptorKey} meta-annotation.

Parameters:
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" these fields are added in the descriptor with their default values.

ModelMBeanOperationInfo

public ModelMBeanOperationInfo(String name,
                               String description,
                               MBeanParameterInfo[] signature,
                               String type,
                               int impact)
Constructs a ModelMBeanOperationInfo object with a default descriptor.

Parameters:
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.

ModelMBeanOperationInfo

public ModelMBeanOperationInfo(String name,
                               String description,
                               MBeanParameterInfo[] signature,
                               String type,
                               int impact,
                               Descriptor descriptor)
Constructs a ModelMBeanOperationInfo object.

Parameters:
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 the fields "displayName" or "role" these fields are added in the descriptor with their default values.
Method Detail

clone

public Object clone()
Creates and returns a new ModelMBeanOperationInfo which is a duplicate of this ModelMBeanOperationInfo.

Overrides:
clone in class MBeanOperationInfo

getDescriptor

public Descriptor getDescriptor()
Returns a copy of the associated Descriptor of the ModelMBeanOperationInfo.

Overrides:
getDescriptor in class MBeanFeatureInfo
Returns:
Descriptor associated with the ModelMBeanOperationInfo object.

setDescriptor

public 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. The Descriptor is validated before it is assigned. If the new Descriptor is invalid, then a RuntimeOperationsException wrapping an IllegalArgumentException is thrown.

Parameters:
inDescriptor - replaces the Descriptor associated with the ModelMBeanOperation.

toString

public String toString()
Returns a string containing the entire contents of the ModelMBeanOperationInfo in human readable form.

Overrides:
toString in class MBeanOperationInfo


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.