javax.management.openmbean
Class OpenMBeanOperationInfoSupport

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.management.MBeanFeatureInfo sample code for javax.management.MBeanFeatureInfo definition code for javax.management.MBeanFeatureInfo 
      extended by javax.management.MBeanOperationInfo sample code for javax.management.MBeanOperationInfo definition code for javax.management.MBeanOperationInfo 
          extended by javax.management.openmbean.OpenMBeanOperationInfoSupport
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable , Cloneable sample code for java.lang.Cloneable definition code for java.lang.Cloneable , OpenMBeanOperationInfo sample code for javax.management.openmbean.OpenMBeanOperationInfo definition code for javax.management.openmbean.OpenMBeanOperationInfo

public class OpenMBeanOperationInfoSupport
extends MBeanOperationInfo sample code for javax.management.MBeanOperationInfo definition code for javax.management.MBeanOperationInfo
implements OpenMBeanOperationInfo sample code for javax.management.openmbean.OpenMBeanOperationInfo definition code for javax.management.openmbean.OpenMBeanOperationInfo , Serializable sample code for java.io.Serializable definition code for java.io.Serializable

Describes an operation of an Open MBean.

Since:
1.5
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.management.MBeanOperationInfo sample code for javax.management.MBeanOperationInfo definition code for javax.management.MBeanOperationInfo
ACTION sample code for javax.management.MBeanOperationInfo.ACTION definition code for javax.management.MBeanOperationInfo.ACTION , ACTION_INFO sample code for javax.management.MBeanOperationInfo.ACTION_INFO definition code for javax.management.MBeanOperationInfo.ACTION_INFO , INFO sample code for javax.management.MBeanOperationInfo.INFO definition code for javax.management.MBeanOperationInfo.INFO , UNKNOWN sample code for javax.management.MBeanOperationInfo.UNKNOWN definition code for javax.management.MBeanOperationInfo.UNKNOWN
 
Fields inherited from class javax.management.MBeanFeatureInfo sample code for javax.management.MBeanFeatureInfo definition code for javax.management.MBeanFeatureInfo
description sample code for javax.management.MBeanFeatureInfo.description definition code for javax.management.MBeanFeatureInfo.description , name sample code for javax.management.MBeanFeatureInfo.name definition code for javax.management.MBeanFeatureInfo.name
 
Constructor Summary
OpenMBeanOperationInfoSupport sample code for javax.management.openmbean.OpenMBeanOperationInfoSupport.OpenMBeanOperationInfoSupport(java.lang.String, java.lang.String, javax.management.openmbean.OpenMBeanParameterInfo[], javax.management.openmbean.OpenType, int) definition code for javax.management.openmbean.OpenMBeanOperationInfoSupport.OpenMBeanOperationInfoSupport(java.lang.String, java.lang.String, javax.management.openmbean.OpenMBeanParameterInfo[], javax.management.openmbean.OpenType, int) (String sample code for java.lang.String definition code for java.lang.String  name, String sample code for java.lang.String definition code for java.lang.String  description, OpenMBeanParameterInfo sample code for javax.management.openmbean.OpenMBeanParameterInfo definition code for javax.management.openmbean.OpenMBeanParameterInfo [] signature, OpenType sample code for javax.management.openmbean.OpenType definition code for javax.management.openmbean.OpenType  returnOpenType, int impact)
          Constructs an OpenMBeanOperationInfoSupport instance, which describes the operation of a class of open MBeans, with the specified name, description, signature, returnOpenType and impact.
 
Method Summary
 boolean equals sample code for javax.management.openmbean.OpenMBeanOperationInfoSupport.equals(java.lang.Object) definition code for javax.management.openmbean.OpenMBeanOperationInfoSupport.equals(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  obj)
          Compares the specified obj parameter with this OpenMBeanOperationInfoSupport instance for equality.
 OpenType sample code for javax.management.openmbean.OpenType definition code for javax.management.openmbean.OpenType getReturnOpenType sample code for javax.management.openmbean.OpenMBeanOperationInfoSupport.getReturnOpenType() definition code for javax.management.openmbean.OpenMBeanOperationInfoSupport.getReturnOpenType() ()
          Returns the open type of the values returned by the operation described by this OpenMBeanOperationInfo instance.
 int hashCode sample code for javax.management.openmbean.OpenMBeanOperationInfoSupport.hashCode() definition code for javax.management.openmbean.OpenMBeanOperationInfoSupport.hashCode() ()
          Returns the hash code value for this OpenMBeanOperationInfoSupport instance.
 String sample code for java.lang.String definition code for java.lang.String toString sample code for javax.management.openmbean.OpenMBeanOperationInfoSupport.toString() definition code for javax.management.openmbean.OpenMBeanOperationInfoSupport.toString() ()
          Returns a string representation of this OpenMBeanOperationInfoSupport instance.
 
Methods inherited from class javax.management.MBeanOperationInfo sample code for javax.management.MBeanOperationInfo definition code for javax.management.MBeanOperationInfo
clone sample code for javax.management.MBeanOperationInfo.clone() definition code for javax.management.MBeanOperationInfo.clone() , getImpact sample code for javax.management.MBeanOperationInfo.getImpact() definition code for javax.management.MBeanOperationInfo.getImpact() , getReturnType sample code for javax.management.MBeanOperationInfo.getReturnType() definition code for javax.management.MBeanOperationInfo.getReturnType() , getSignature sample code for javax.management.MBeanOperationInfo.getSignature() definition code for javax.management.MBeanOperationInfo.getSignature()
 
Methods inherited from class javax.management.MBeanFeatureInfo sample code for javax.management.MBeanFeatureInfo definition code for javax.management.MBeanFeatureInfo
getDescription sample code for javax.management.MBeanFeatureInfo.getDescription() definition code for javax.management.MBeanFeatureInfo.getDescription() , getName sample code for javax.management.MBeanFeatureInfo.getName() definition code for javax.management.MBeanFeatureInfo.getName()
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 
Methods inherited from interface javax.management.openmbean.OpenMBeanOperationInfo sample code for javax.management.openmbean.OpenMBeanOperationInfo definition code for javax.management.openmbean.OpenMBeanOperationInfo
getDescription sample code for javax.management.openmbean.OpenMBeanOperationInfo.getDescription() definition code for javax.management.openmbean.OpenMBeanOperationInfo.getDescription() , getImpact sample code for javax.management.openmbean.OpenMBeanOperationInfo.getImpact() definition code for javax.management.openmbean.OpenMBeanOperationInfo.getImpact() , getName sample code for javax.management.openmbean.OpenMBeanOperationInfo.getName() definition code for javax.management.openmbean.OpenMBeanOperationInfo.getName() , getReturnType sample code for javax.management.openmbean.OpenMBeanOperationInfo.getReturnType() definition code for javax.management.openmbean.OpenMBeanOperationInfo.getReturnType() , getSignature sample code for javax.management.openmbean.OpenMBeanOperationInfo.getSignature() definition code for javax.management.openmbean.OpenMBeanOperationInfo.getSignature()
 

Constructor Detail

OpenMBeanOperationInfoSupport sample code for javax.management.openmbean.OpenMBeanOperationInfoSupport(java.lang.String, java.lang.String, javax.management.openmbean.OpenMBeanParameterInfo[], javax.management.openmbean.OpenType, int) definition code for javax.management.openmbean.OpenMBeanOperationInfoSupport(java.lang.String, java.lang.String, javax.management.openmbean.OpenMBeanParameterInfo[], javax.management.openmbean.OpenType, int)

public OpenMBeanOperationInfoSupport(String sample code for java.lang.String definition code for java.lang.String  name,
                                     String sample code for java.lang.String definition code for java.lang.String  description,
                                     OpenMBeanParameterInfo sample code for javax.management.openmbean.OpenMBeanParameterInfo definition code for javax.management.openmbean.OpenMBeanParameterInfo [] signature,
                                     OpenType sample code for javax.management.openmbean.OpenType definition code for javax.management.openmbean.OpenType  returnOpenType,
                                     int impact)
Constructs an OpenMBeanOperationInfoSupport instance, which describes the operation of a class of open MBeans, with the specified name, description, signature, returnOpenType and impact.

The signature array parameter is internally copied, so that subsequent changes to the array referenced by signature have no effect on this instance.

Parameters:
name - cannot be a null or empty string.
description - cannot be a null or empty string.
signature - can be null or empty if there are no parameters to describe.
returnOpenType - cannot be null: use SimpleType.VOID for operations that return nothing.
impact - can be only one of ACTION, ACTION_INFO or INFO.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if name or description are null or empty string, or returnOpenType is null, or impact is not one of ACTION, ACTION_INFO or INFO.
ArrayStoreException sample code for java.lang.ArrayStoreException definition code for java.lang.ArrayStoreException - If signature is not an array of instances of a subclass of MBeanParameterInfo.
Method Detail

getReturnOpenType sample code for javax.management.openmbean.OpenMBeanOperationInfoSupport.getReturnOpenType() definition code for javax.management.openmbean.OpenMBeanOperationInfoSupport.getReturnOpenType()

public OpenType sample code for javax.management.openmbean.OpenType definition code for javax.management.openmbean.OpenType  getReturnOpenType()
Returns the open type of the values returned by the operation described by this OpenMBeanOperationInfo instance.

Specified by:
getReturnOpenType sample code for javax.management.openmbean.OpenMBeanOperationInfo.getReturnOpenType() definition code for javax.management.openmbean.OpenMBeanOperationInfo.getReturnOpenType() in interface OpenMBeanOperationInfo sample code for javax.management.openmbean.OpenMBeanOperationInfo definition code for javax.management.openmbean.OpenMBeanOperationInfo
Returns:
the return type.

equals sample code for javax.management.openmbean.OpenMBeanOperationInfoSupport.equals(java.lang.Object) definition code for javax.management.openmbean.OpenMBeanOperationInfoSupport.equals(java.lang.Object)

public boolean equals(Object sample code for java.lang.Object definition code for java.lang.Object  obj)
Compares the specified obj parameter with this OpenMBeanOperationInfoSupport instance for equality.

Returns true if and only if all of the following statements are true:

This ensures that this equals method works properly for obj parameters which are different implementations of the OpenMBeanOperationInfo interface.
 

Specified by:
equals sample code for javax.management.openmbean.OpenMBeanOperationInfo.equals(java.lang.Object) definition code for javax.management.openmbean.OpenMBeanOperationInfo.equals(java.lang.Object) in interface OpenMBeanOperationInfo sample code for javax.management.openmbean.OpenMBeanOperationInfo definition code for javax.management.openmbean.OpenMBeanOperationInfo
Overrides:
equals sample code for javax.management.MBeanOperationInfo.equals(java.lang.Object) definition code for javax.management.MBeanOperationInfo.equals(java.lang.Object) in class MBeanOperationInfo sample code for javax.management.MBeanOperationInfo definition code for javax.management.MBeanOperationInfo
Parameters:
obj - the object to be compared for equality with this OpenMBeanOperationInfoSupport instance;
Returns:
true if the specified object is equal to this OpenMBeanOperationInfoSupport instance.
See Also:
Object.hashCode() sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable

hashCode sample code for javax.management.openmbean.OpenMBeanOperationInfoSupport.hashCode() definition code for javax.management.openmbean.OpenMBeanOperationInfoSupport.hashCode()

public int hashCode()
Returns the hash code value for this OpenMBeanOperationInfoSupport instance.

The hash code of an OpenMBeanOperationInfoSupport instance is the sum of the hash codes of all elements of information used in equals comparisons (ie: its name, return open type, impact and signature, where the signature hashCode is calculated by a call to java.util.Arrays.asList(this.getSignature).hashCode()).

This ensures that t1.equals(t2) implies that t1.hashCode()==t2.hashCode() for any two OpenMBeanOperationInfoSupport instances t1 and t2, as required by the general contract of the method Object.hashCode() sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() .

However, note that another instance of a class implementing the OpenMBeanOperationInfo interface may be equal to this OpenMBeanOperationInfoSupport instance as defined by equals(java.lang.Object) sample code for javax.management.openmbean.OpenMBeanOperationInfoSupport.equals(java.lang.Object) definition code for javax.management.openmbean.OpenMBeanOperationInfoSupport.equals(java.lang.Object) , but may have a different hash code if it is calculated differently.

As OpenMBeanOperationInfoSupport instances are immutable, the hash code for this instance is calculated once, on the first call to hashCode, and then the same value is returned for subsequent calls.

Specified by:
hashCode sample code for javax.management.openmbean.OpenMBeanOperationInfo.hashCode() definition code for javax.management.openmbean.OpenMBeanOperationInfo.hashCode() in interface OpenMBeanOperationInfo sample code for javax.management.openmbean.OpenMBeanOperationInfo definition code for javax.management.openmbean.OpenMBeanOperationInfo
Overrides:
hashCode sample code for javax.management.MBeanOperationInfo.hashCode() definition code for javax.management.MBeanOperationInfo.hashCode() in class MBeanOperationInfo sample code for javax.management.MBeanOperationInfo definition code for javax.management.MBeanOperationInfo
Returns:
the hash code value for this OpenMBeanOperationInfoSupport instance
See Also:
Object.equals(java.lang.Object) sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable

toString sample code for javax.management.openmbean.OpenMBeanOperationInfoSupport.toString() definition code for javax.management.openmbean.OpenMBeanOperationInfoSupport.toString()

public String sample code for java.lang.String definition code for java.lang.String  toString()
Returns a string representation of this OpenMBeanOperationInfoSupport instance.

The string representation consists of the name of this class (ie javax.management.openmbean.OpenMBeanOperationInfoSupport), and the name, signature, return open type and impact of the described operation.

As OpenMBeanOperationInfoSupport instances are immutable, the string representation for this instance is calculated once, on the first call to toString, and then the same value is returned for subsequent calls.

Specified by:
toString sample code for javax.management.openmbean.OpenMBeanOperationInfo.toString() definition code for javax.management.openmbean.OpenMBeanOperationInfo.toString() in interface OpenMBeanOperationInfo sample code for javax.management.openmbean.OpenMBeanOperationInfo definition code for javax.management.openmbean.OpenMBeanOperationInfo
Overrides:
toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() in class Object sample code for java.lang.Object definition code for java.lang.Object
Returns:
a string representation of this OpenMBeanOperationInfoSupport instance