01: /*
02: * JBoss, Home of Professional Open Source.
03: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
04: * as indicated by the @author tags. See the copyright.txt file in the
05: * distribution for a full listing of individual contributors.
06: *
07: * This is free software; you can redistribute it and/or modify it
08: * under the terms of the GNU Lesser General Public License as
09: * published by the Free Software Foundation; either version 2.1 of
10: * the License, or (at your option) any later version.
11: *
12: * This software is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * Lesser General Public License for more details.
16: *
17: * You should have received a copy of the GNU Lesser General Public
18: * License along with this software; if not, write to the Free
19: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21: */
22: package javax.management.openmbean;
23:
24: /**
25: * An open MBean attribute info implements this interface as well as extending
26: * MBeanAttributeInfo.<p>
27: *
28: * {@link OpenMBeanAttributeInfoSupport} is an example of such a class.
29: *
30: * @author <a href="mailto:Adrian.Brock@HappeningTimes.com">Adrian Brock</a>.
31: *
32: * @version $Revision: 57200 $
33: *
34: */
35: public interface OpenMBeanAttributeInfo extends OpenMBeanParameterInfo {
36: // Attributes ----------------------------------------------------
37:
38: // Constructors --------------------------------------------------
39:
40: // Public --------------------------------------------------------
41:
42: /**
43: * Test whether an attribute is readable.
44: *
45: * @return true when the attribute is readable or false otherwise
46: */
47: boolean isReadable();
48:
49: /**
50: * Test whether an attribute is writable.
51: *
52: * @return true when the attribute is writable or false otherwise
53: */
54: boolean isWritable();
55:
56: /**
57: * Test whether an attribute is accessed through an isXXX getter.
58: *
59: * @return the result of the above test
60: */
61: boolean isIs();
62:
63: /**
64: * Compares an object for equality with the implementing class.<p>
65: *
66: * The object is not null<br>
67: * The object implements the open mbean parameter info interface<br>
68: * The parameter names are equal<br>
69: * The open types are equal<br>
70: * The access properties are the same<br>
71: * The default, min, max and legal values are equal
72: *
73: * @param obj the object to test
74: * @return true when above is true, false otherwise
75: */
76: boolean equals(Object obj);
77:
78: /**
79: * Generates a hashcode for the implementation.<p>
80: *
81: * The sum of the hashCodes for the elements mentioned in the equals
82: * method
83: *
84: * @return the calculated hashcode
85: */
86: int hashCode();
87:
88: /**
89: * A string representation of the open mbean parameter info.<p>
90: *
91: * It is made up of implementation class and the values mentioned
92: * in the equals method
93: *
94: * @return the string
95: */
96: String toString();
97: }
|