001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package javax.management.openmbean;
023:
024: import javax.management.MBeanParameterInfo;
025:
026: /**
027: * An open MBean operation info implements this interface as well as extending
028: * MBeanOperationInfo.<p>
029: *
030: * {@link OpenMBeanOperationInfoSupport} is an example of such a class.
031: *
032: * @author <a href="mailto:Adrian.Brock@HappeningTimes.com">Adrian Brock</a>.
033: *
034: * @version $Revision: 57200 $
035: *
036: */
037: public interface OpenMBeanOperationInfo {
038: // Attributes ----------------------------------------------------
039:
040: // Constructors --------------------------------------------------
041:
042: // Public --------------------------------------------------------
043:
044: /**
045: * Retrieve a human readable description of the open MBean operation the
046: * implementation of this interface describes.
047: *
048: * @return the description.
049: */
050: String getDescription();
051:
052: /**
053: * Retrieve the name of the operation described.
054: *
055: * @return the name.
056: */
057: String getName();
058:
059: /**
060: * Returns an array of the parameters passed to the operation<p>
061: *
062: * The parameters must be OpenMBeanParameterInfos.
063: *
064: * @return the operation's parameters.
065: */
066: MBeanParameterInfo[] getSignature();
067:
068: /**
069: * Retrieves the impact of the operation.<pr>
070: *
071: * One of<br>
072: * {@link javax.management.MBeanOperationInfo#INFO}<br>
073: * {@link javax.management.MBeanOperationInfo#ACTION}<br>
074: * {@link javax.management.MBeanOperationInfo#ACTION_INFO}
075: *
076: * @return the impact.
077: */
078: int getImpact();
079:
080: /**
081: * Retrieves the return type of operation.<pr>
082: *
083: * This must be same as getReturnOpenType().getClassName()
084: *
085: * @return the return type.
086: */
087: String getReturnType();
088:
089: /**
090: * Retrieves the open type return type of operation.
091: *
092: * @return the open type of the return type.
093: */
094: OpenType getReturnOpenType();
095:
096: /**
097: * Compares an object for equality with the implementing class.<p>
098: *
099: * The object is not null<br>
100: * The object implements the open mbean operation info interface<br>
101: * The operation names are equal<br>
102: * The signatures are equal<br>
103: * The return types are equal<br>
104: * The impacts are equal<br>
105: *
106: * @param obj the object to test
107: * @return true when above is true, false otherwise
108: */
109: boolean equals(Object obj);
110:
111: /**
112: * Generates a hashcode for the implementation.<p>
113: *
114: * The sum of the hashCodes for the elements mentioned in the equals
115: * method
116: *
117: * @return the calculated hashcode
118: */
119: int hashCode();
120:
121: /**
122: * A string representation of the open mbean operation info.<p>
123: *
124: * It is made up of implementation class and the values mentioned
125: * in the equals method
126: *
127: * @return the string
128: */
129: String toString();
130: }
|