javax.management
Class MBeanOperationInfo

java.lang.Object
  extended byjavax.management.MBeanFeatureInfo (src) 
      extended byjavax.management.MBeanOperationInfo
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable
Direct Known Subclasses:
ModelMBeanOperationInfo (src) , OpenMBeanOperationInfoSupport (src)

public class MBeanOperationInfo
extends MBeanFeatureInfo (src)
implements java.io.Serializable, java.lang.Cloneable

Describes an operation exposed by an MBean This implementation protects its immutability by taking shallow clones of all arrays supplied in constructors and by returning shallow array clones in getXXX() methods.

See Also:
Serialized Form

Field Summary
static int ACTION
          Management operation impact: ACTION.
static int ACTION_INFO
          Management operation impact: ACTION_INFO.
static int INFO
          Management operation impact: INFO.
static int UNKNOWN
          Management operation impact: UNKNOWN.
 
Fields inherited from class javax.management.MBeanFeatureInfo (src)
description, name
 
Constructor Summary
MBeanOperationInfo(java.lang.String description, java.lang.reflect.Method method)
          Constructs management operation metadata from a given Method object and description.
MBeanOperationInfo(java.lang.String name, java.lang.String description, MBeanParameterInfo (src) [] inSignature, java.lang.String returnType, int impact)
          Constructs a management operation metadata.
 
Method Summary
 java.lang.Object clone()
          Creates a copy of this object.
 boolean equals(java.lang.Object object)
           
 int getImpact()
          Returns the impact of this operation.
 java.lang.String getReturnType()
          Returns a fully qualified class name of the return type of this operation.
 MBeanParameterInfo (src) [] getSignature()
          Returns the signature of this operation.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class javax.management.MBeanFeatureInfo (src)
getDescription, getName
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

INFO

public static final int INFO
Management operation impact: INFO. The operation should not alter the state of the MBean component (read operation).

See Also:
Constant Field Values (src)

ACTION

public static final int ACTION
Management operation impact: ACTION. The operation changes the state of the MBean component (write operation).

See Also:
Constant Field Values (src)

ACTION_INFO

public static final int ACTION_INFO
Management operation impact: ACTION_INFO. Operation behaves like a read/write operation.

See Also:
Constant Field Values (src)

UNKNOWN

public static final int UNKNOWN
Management operation impact: UNKNOWN. Reserved for Standard MBeans.

See Also:
Constant Field Values (src)
Constructor Detail

MBeanOperationInfo

public MBeanOperationInfo(java.lang.String description,
                          java.lang.reflect.Method method)
                   throws java.lang.IllegalArgumentException
Constructs management operation metadata from a given Method object and description.

Parameters:
description - human readable description of this operation
method - used for build the metadata for the management operation

MBeanOperationInfo

public MBeanOperationInfo(java.lang.String name,
                          java.lang.String description,
                          MBeanParameterInfo (src) [] inSignature,
                          java.lang.String returnType,
                          int impact)
                   throws java.lang.IllegalArgumentException
Constructs a management operation metadata.

Parameters:
name - name of the management operation
description - human readable description string of the operation
inSignature - inSignature of the operation
returnType - return type of the operation as a fully qualified class name
impact - impact of this operation: ACTION, INFO, ACTION_INFO or UNKNOWN
Throws:
java.lang.IllegalArgumentException - if the name or return type is not a valid java identifier or it is a reserved word or the impact is invalid
Method Detail

getReturnType

public java.lang.String getReturnType()
Returns a fully qualified class name of the return type of this operation.

Returns:
fully qualified class name

getSignature

public MBeanParameterInfo (src) [] getSignature()
Returns the signature of this operation. Note: an operation with a void signature returns a zero-length array, not a null reference.

Returns:
operation's signature

getImpact

public int getImpact()
Returns the impact of this operation. The impact is one of the following values: ACTION, INFO, ACTION_INFO or UNKNOWN (reserved for Standard MBeans).

Returns:
operation's impact

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class MBeanFeatureInfo (src)

hashCode

public int hashCode()
Overrides:
hashCode in class MBeanFeatureInfo (src)

toString

public java.lang.String toString()
Overrides:
toString in class MBeanFeatureInfo (src)
Returns:
a human readable string

clone

public java.lang.Object clone()
Creates a copy of this object. This is a deep copy; the MBeanParameterInfo objects forming the operation's signature are also cloned.

Returns:
a clone of this object