001: /**
002: * Copyright (C) The MX4J Contributors.
003: * All rights reserved.
004: *
005: * This software is distributed under the terms of the MX4J License version 1.0.
006: * See the terms of the MX4J License in the documentation provided with this software.
007: */package javax.management.openmbean;
008:
009: import javax.management.MBeanParameterInfo;
010:
011: /**
012: * Describes operation of an OpenMBean
013: *
014: * @version $Revision: 1.6 $
015: */
016: public interface OpenMBeanOperationInfo {
017:
018: /**
019: * Returs a human readable description about this operation.
020: *
021: * @return String The human readable operation description
022: */
023: public String getDescription();
024:
025: /**
026: * Returns the name of the operation being described by this
027: * <code>OpenMBeanOperationInfo</code>
028: *
029: * @return String the Operation name
030: */
031: public String getName();
032:
033: /**
034: * Returns an array of <code>MBeanParameterInfo</code> for the operation
035: *
036: * @param MBeanParameterInfo An array of Parameterinfo
037: */
038: public MBeanParameterInfo[] getSignature();
039:
040: /**
041: * Returns a constant which qualifies the impact of the operation
042: * being described by the <code>OpenMBeanOperationInfo</code>.
043: * <p/>
044: * <p/>
045: * The return constant is one of the ff:
046: * </p>
047: * <p/>
048: * <ul>
049: * <li>{@link javax.management.MBeanOperationInfo#INFO MBeanOperationInfo.INFO}</li>
050: * <li>{@link javax.management.MBeanOperationInfo#ACTION MBeanOperationInfo.ACTION}</li>
051: * <li>{@link javax.management.MBeanOperationInfo#ACTION_INFO MBeanOperationInfo.ACTION_INFO}</li>
052: * </ul>
053: * </p>
054: *
055: * @return int The operation impact
056: */
057: public int getImpact();
058:
059: /**
060: * Return the fully qualified class name of the values being
061: * returned by this operation.
062: * Note that getReturnType and getReturnOpenType.getClassName
063: * should be equal.
064: *
065: * @return String The fully qualified classname of the return type
066: */
067: public String getReturnType();
068:
069: /**
070: * Return the OpenType of the values returned by this <code>OpenMBeanOperationInfo</code>
071: *
072: * @return OpenType The OpenType object
073: */
074: public OpenType getReturnOpenType(); // open MBean specific method
075:
076: /**
077: * Test the specified object for equality.
078: * <p/>
079: * <p/>
080: * This method will return true if and only if the following
081: * conditions are true:
082: * </p>
083: * <p/>
084: * <ul>
085: * <li>obj is not null</li>
086: * <li>obj also implements OpenMBeanOperationInfo</li>
087: * <li>their names are equal</li>
088: * <li>their signatures are equal</li>
089: * <li>their return opentypes are equal</li>
090: * <li>their impacts are equal</li>
091: * </ul>
092: * <p/>
093: * </p>
094: *
095: * @param obj The object being compared to
096: * @return boolean
097: */
098: public boolean equals(Object obj);
099:
100: /**
101: * Returns the hashcode of this <code>OpenMBeanOperationInfo</code>
102: *
103: * @return int The hashcode
104: */
105: public int hashCode();
106:
107: /**
108: * Return a String representation
109: */
110: public String toString();
111: }
|