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 constructor info implements this interface as well as extending
028: * MBeanConstructorInfo.<p>
029: *
030: * {@link OpenMBeanConstructorInfoSupport} 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 OpenMBeanConstructorInfo {
038: // Attributes ----------------------------------------------------
039:
040: // Constructors --------------------------------------------------
041:
042: // Public --------------------------------------------------------
043:
044: /**
045: * Retrieve a human readable description of the open MBean constructor the
046: * implementation of this interface describes.
047: *
048: * @return the description.
049: */
050: String getDescription();
051:
052: /**
053: * Retrieve the name of the constructor described.
054: *
055: * @return the name.
056: */
057: String getName();
058:
059: /**
060: * Returns an array of the parameters passed to the constructor<p>
061: *
062: * The parameters must be OpenMBeanParameterInfos.
063: *
064: * @return the constructor's parameters.
065: */
066: MBeanParameterInfo[] getSignature();
067:
068: /**
069: * Compares an object for equality with the implementing class.<p>
070: *
071: * The object is not null<br>
072: * The object implements the open mbean constructor info interface<br>
073: * The constructor names are equal<br>
074: * The signatures are equal<br>
075: *
076: * @param obj the object to test
077: * @return true when above is true, false otherwise
078: */
079: boolean equals(Object obj);
080:
081: /**
082: * Generates a hashcode for the implementation.<p>
083: *
084: * The sum of the hashCodes for the elements mentioned in the equals
085: * method
086: *
087: * @return the calculated hashcode
088: */
089: int hashCode();
090:
091: /**
092: * A string representation of the open mbean constructor info.<p>
093: *
094: * It is made up of implementation class and the values mentioned
095: * in the equals method
096: *
097: * @return the string
098: */
099: String toString();
100: }
|