01: /**
02: * The XMOJO Project 5
03: * Copyright © 2003 XMOJO.org. All rights reserved.
04:
05: * NO WARRANTY
06:
07: * BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
08: * THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
09: * OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
10: * PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
11: * OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
12: * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
13: * TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE
14: * LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
15: * REPAIR OR CORRECTION.
16:
17: * IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
18: * ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE
19: * THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
20: * GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
21: * USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF
22: * DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
23: * PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE),
24: * EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
25: * SUCH DAMAGES.
26: **/package javax.management;
27:
28: import java.io.Serializable;
29:
30: /**
31: * Provides general information for an MBean descriptor object.
32: * The feature described can be:
33: * <ul>
34: * <li> an attribute,
35: * <li> an operation,
36: * <li> a parameter,
37: * <li> a returned value or
38: * <li> a notification.
39: * </ul>
40: */
41: public class MBeanFeatureInfo implements java.io.Serializable {
42: /* Serial version UID */
43: private static final long serialVersionUID = 0x36db75dcc2c15521L;
44:
45: /**
46: * The name of the feature.
47: */
48: protected String name = null;
49:
50: /**
51: * The description of the feature in a String format
52: */
53: protected String description = null;
54:
55: /**
56: * Constructs a MBeanFeatureInfo object.
57: *
58: * @param name The name of the feature.
59: *
60: * @param description A human readable description of the feature.
61: */
62: public MBeanFeatureInfo(String name, String description) {
63: this .name = name;
64: this .description = description;
65: }
66:
67: /**
68: * Returns the human readable description of the feature.
69: *
70: * @return the human readable description of the feature as String.
71: */
72: public String getDescription() {
73: return description;
74: }
75:
76: /**
77: * Returns the name of the feature.
78: *
79: * @return the name of the feature.
80: */
81: public String getName() {
82: return name;
83: }
84:
85: /**
86: * Returns a human readable version of the MBeanFeatureInfo instance
87: * @return MBeanFeatrueInfo is returned in a human readable form (i.e) as a String
88: */
89: public String toString() {
90: return (" Name = " + name + "\n Description = " + description);
91: }
92: }
|