javax.management.modelmbean
Class ModelMBeanOperationInfo

java.lang.Object
  |
  +--javax.management.MBeanFeatureInfo
        |
        +--javax.management.MBeanOperationInfo
              |
              +--javax.management.modelmbean.ModelMBeanOperationInfo

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           : getter, setter, operation, constructor
	targetObject   : object on which to execute this method
	targetType     : type of object reference for targetObject:

                ObjectReference|EJBHandle|IOR|RMIReference
	lastReturnedValue     : cached value for operation
	currencyTimeLimit     : how long cached value is valid
	lastReturnedTimeStamp : 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, and role fields set.

See Also:
Serialized Form

Fields inherited from class javax.management.MBeanOperationInfo
ACTION, ACTION_INFO, INFO, NO_OPERATIONS, UNKNOWN
 
Fields inherited from class javax.management.MBeanFeatureInfo
description, name
 
Constructor Summary
ModelMBeanOperationInfo(ModelMBeanOperationInfo inInfo)
          Creates a ModelMBeanOperationInfo with the specified ModelMBeanOperationInfo object.
ModelMBeanOperationInfo(java.lang.String description, java.lang.reflect.Method method)
          Constructs a ModelMBeanOperationInfo object with a default descriptor.
ModelMBeanOperationInfo(java.lang.String description, java.lang.reflect.Method method, Descriptor descriptor)
          Constructs a ModelMBeanOperationInfo object.
ModelMBeanOperationInfo(java.lang.String name, java.lang.String description, MBeanParameterInfo[] signature, java.lang.String type, int impact)
          Constructs a ModelMBeanOperationInfo object with a default descriptor.
ModelMBeanOperationInfo(java.lang.String name, java.lang.String description, MBeanParameterInfo[] signature, java.lang.String type, int impact, Descriptor descriptor)
          Constructs a ModelMBeanOperationInfo object escriptorth with the specified Descriptor.
 
Method Summary
(package private) static void ()
           
 java.lang.Object clone()
          Creates a duplicate object of ModelMBeanOperationInfo
 Descriptor getDescriptor()
          Returns a copy of the associated Descriptor of the ModelMBeanOperationInfo.
 void setDescriptor(Descriptor inDescriptor)
          Sets the specified Descriptor to this ModelMBeanNotificationInfo.If the value is null then default Descriptor will be taken.
 java.lang.String toString()
          Returns a human readable version of the ModelMBeanOperationInfo instance
 
Methods inherited from class javax.management.MBeanOperationInfo
equals, getImpact, getReturnType, getSignature, hashCode
 
Methods inherited from class javax.management.MBeanFeatureInfo
getDescription, getName
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModelMBeanOperationInfo

public ModelMBeanOperationInfo(java.lang.String description,
                               java.lang.reflect.Method method)
Constructs a ModelMBeanOperationInfo object with a default descriptor.
Parameters:
operationMethod - The java.lang.reflect.Method object describing the MBean operation.
description - A human readable description of the operation.

ModelMBeanOperationInfo

public ModelMBeanOperationInfo(java.lang.String description,
                               java.lang.reflect.Method method,
                               Descriptor descriptor)
Constructs a ModelMBeanOperationInfo object.
Parameters:
operationMethod - The java.lang.reflect.Method object describing the MBean operation.
description - A human readable description of the 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.
Throws:
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 field "role" is not equal to "operation".

ModelMBeanOperationInfo

public ModelMBeanOperationInfo(java.lang.String name,
                               java.lang.String description,
                               MBeanParameterInfo[] signature,
                               java.lang.String type,
                               int impact)
Constructs a ModelMBeanOperationInfo object with a default descriptor.
Parameters:
name - The method name
description - A human readable description of the operation.
signature - The array of MBeanParameterInfo contains the parameters or arguments of the method
type - The return type of the method
impact - The impact of the method, will be anyone of the following INFO, ACTION, ACTION_INFO, UNKNOWN.

ModelMBeanOperationInfo

public ModelMBeanOperationInfo(java.lang.String name,
                               java.lang.String description,
                               MBeanParameterInfo[] signature,
                               java.lang.String type,
                               int impact,
                               Descriptor descriptor)
Constructs a ModelMBeanOperationInfo object escriptorth with the specified Descriptor.
Parameters:
name - The method name
description - A human readable description of the operation.
signature - The array of MBeanParameterInfo contains the parameters or arguments of the method
type - The return type of the method
impact - The impact of the method, will be anyone of the following INFO, ACTION, ACTION_INFO, UNKNOWN.
descriptor - Descriptor containing the appropriate metadata for this instance of the MBeanOperationInfo. If it is null or invalid then a default desriptor will be created.
Throws:
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 field "role" is not equal to "operation".

ModelMBeanOperationInfo

public ModelMBeanOperationInfo(ModelMBeanOperationInfo inInfo)
Creates a ModelMBeanOperationInfo with the specified ModelMBeanOperationInfo object.
Parameters:
inInfo - ModelMBeanOperationInfo object
Method Detail

static void ()

getDescriptor

public Descriptor getDescriptor()
Returns a copy of the associated Descriptor of the ModelMBeanOperationInfo.
Specified by:
getDescriptor in interface DescriptorAccess
Returns:
Descriptor associated with the ModelMBeanOperationInfo object.
See Also:
setDescriptor(javax.management.Descriptor)

setDescriptor

public void setDescriptor(Descriptor inDescriptor)
Sets the specified Descriptor to this ModelMBeanNotificationInfo.If the value is null then default Descriptor will be taken. The Descriptor is validated before it is assigned. If the new Descriptor is invalid, then an IllegalArgumentException is thrown. The following fields will be defaulted if they are not already set: role=operation,displayName=this.getName()
Specified by:
setDescriptor in interface DescriptorAccess
Parameters:
inDescriptor - This replaces the Descriptor associated with the ModelMBeanNotification interface
Throws:
java.lang.IllegalArgumentException - If the new Descriptor is invalid, then it will be thrown.

clone

public java.lang.Object clone()
Creates a duplicate object of ModelMBeanOperationInfo
Overrides:
clone in class MBeanOperationInfo
Returns:
Create and return a duplicate object of ModelMBeanOperationInfo

toString

public java.lang.String toString()
Returns a human readable version of the ModelMBeanOperationInfo instance
Overrides:
toString in class MBeanOperationInfo
Returns:
This returns human readable version of the ModelMBeanOperationInfo instance