KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > corba > se > spi > monitoring > MonitoredObject


1 /*
2  * @(#)MonitoredObject.java 1.4 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7 package com.sun.corba.se.spi.monitoring;
8
9
10 import com.sun.corba.se.spi.monitoring.MonitoredAttribute;
11 import java.util.*;
12 import java.util.Collection JavaDoc;
13
14 /**
15  * <p>
16  *
17  * @author Hemanth Puttaswamy
18  * </p>
19  * <p>
20  * Monitored Object provides an Hierarchichal view of the ORB Monitoring
21  * System. It can contain multiple children and a single parent. Each
22  * Monitored Object may also contain Multiple Monitored Attributes.
23  * </p>
24  */

25 public interface MonitoredObject {
26
27   ///////////////////////////////////////
28
// operations
29
/**
30  * <p>
31  * Gets the name of this MonitoredObject
32  * </p><p>
33  *
34  * @return a String with name of this Monitored Object
35  * </p>
36  */

37     public String JavaDoc getName();
38 /**
39  * <p>
40  * Gets the description of MonitoredObject
41  * </p><p>
42  *
43  * @return a String with Monitored Object Description.
44  * </p>
45  */

46     public String JavaDoc getDescription();
47 /**
48  * <p>
49  * This method will add a child Monitored Object to this Monitored Object.
50  * </p>
51  * <p>
52  * </p>
53  */

54     public void addChild( MonitoredObject m );
55 /**
56  * <p>
57  * This method will remove child Monitored Object identified by the given name
58  * </p>
59  * <p>
60  * @param name of the ChildMonitored Object
61  * </p>
62  */

63     public void removeChild( String JavaDoc name );
64
65 /**
66  * <p>
67  * Gets the child MonitoredObject associated with this MonitoredObject
68  * instance using name as the key. The name should be fully qualified name
69  * like orb.connectionmanager
70  * </p>
71  * <p>
72  *
73  * @return a MonitoredObject identified by the given name
74  * </p>
75  * <p>
76  * @param name of the ChildMonitored Object
77  * </p>
78  */

79     public MonitoredObject getChild(String JavaDoc name);
80 /**
81  * <p>
82  * Gets all the Children registered under this instance of Monitored
83  * Object.
84  * </p>
85  * <p>
86  *
87  * @return Collection of immediate Children associated with this MonitoredObject.
88  * </p>
89  */

90     public Collection JavaDoc getChildren();
91 /**
92  * <p>
93  * Sets the parent for this Monitored Object.
94  * </p>
95  * <p>
96  * </p>
97  */

98     public void setParent( MonitoredObject m );
99 /**
100  * <p>
101  * There will be only one parent for an instance of MontoredObject, this
102  * call gets parent and returns null if the Monitored Object is the root.
103  * </p>
104  * <p>
105  *
106  * @return a MonitoredObject which is a Parent of this Monitored Object instance
107  * </p>
108  */

109     public MonitoredObject getParent();
110
111 /**
112  * <p>
113  * Adds the attribute with the given name.
114  * </p>
115  * <p>
116  *
117  * </p>
118  * <p>
119  * @param value is the MonitoredAttribute which will be set as one of the
120  * attribute of this MonitoredObject.
121  * </p>
122  */

123     public void addAttribute(MonitoredAttribute value);
124 /**
125  * <p>
126  * Removes the attribute with the given name.
127  * </p>
128  * <p>
129  *
130  * </p>
131  * <p>
132  * @param name is the MonitoredAttribute name
133  * </p>
134  */

135     public void removeAttribute(String JavaDoc name);
136   
137 /**
138  * <p>
139  * Gets the Monitored Object registered by the given name
140  * </p>
141  *
142  * <p>
143  * @return a MonitoredAttribute identified by the given name
144  * </p>
145  * <p>
146  * @param name of the attribute
147  * </p>
148  */

149     public MonitoredAttribute getAttribute(String JavaDoc name);
150 /**
151  * <p>
152  * Gets all the Monitored Attributes for this Monitored Objects. It doesn't
153  * include the Child Monitored Object, that needs to be traversed using
154  * getChild() or getChildren() call.
155  * </p>
156  * <p>
157  *
158  * @return Collection of all the Attributes for this MonitoredObject
159  * </p>
160  */

161     public Collection JavaDoc getAttributes();
162 /**
163  * <p>
164  * Clears the state of all the Monitored Attributes associated with the
165  * Monitored Object. It will also clear the state on all it's child
166  * Monitored Object. The call to clearState will be initiated from
167  * CORBAMBean.startMonitoring() call.
168  * </p>
169  *
170  */

171     public void clearState();
172
173 } // end MonitoredObject
174
Popular Tags