KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * @(#)MonitoredAttribute.java 1.3 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 import com.sun.corba.se.spi.monitoring.MonitoredAttributeInfo;
10 import java.util.*;
11
12 /**
13  * <p>
14  *
15  * @author Hemanth Puttaswamy
16  * </p>
17  * <p>
18  * Monitored Attribute is the interface to represent a Monitorable
19  * Attribute. Using this interface, one can get the value of the attribute
20  * and set the value if it is a writeable attribute.
21  * </p>
22  */

23 public interface MonitoredAttribute {
24
25   ///////////////////////////////////////
26
// operations
27

28 /**
29  * <p>
30  * Gets the Monitored Attribute Info for the attribute.
31  * </p>
32  * <p>
33  *
34  * @param monitoredAttributeInfo for this Monitored Attribute.
35  * </p>
36  */

37     public MonitoredAttributeInfo getAttributeInfo();
38 /**
39  * <p>
40  * Sets the value for the Monitored Attribute if isWritable() is false, the
41  * method will throw ILLEGAL Operation exception.
42  *
43  * Also, the type of 'value' should be same as specified in the
44  * MonitoredAttributeInfo for a particular instance.
45  * </p>
46  * <p>
47  *
48  * @param value should be any one of the Basic Java Type Objects which are
49  * Long, Double, Float, String, Integer, Short, Character, Byte.
50  * </p>
51  */

52     public void setValue(Object JavaDoc value);
53
54
55 /**
56  * <p>
57  * Gets the value of the Monitored Attribute. The value can be obtained
58  * from different parts of the module. User may choose to delegate the call
59  * to getValue() to other variables.
60  *
61  * NOTE: It is important to make sure that the type of Object returned in
62  * getvalue is same as the one specified in MonitoredAttributeInfo for this
63  * attribute.
64  * </p>
65  * <p>
66  *
67  * </p>
68  * <p>
69  *
70  * @param value is the current value for this MonitoredAttribute
71  * </p>
72  */

73     public Object JavaDoc getValue();
74 /**
75  * <p>
76  * Gets the name of the Monitored Attribute.
77  * </p>
78  * <p>
79  *
80  * @param name of this Attribute
81  * </p>
82  */

83     public String JavaDoc getName();
84 /**
85  * <p>
86  * If this attribute needs to be cleared, the user needs to implement this
87  * method to reset the state to initial state. If the Monitored Attribute
88  * doesn't change like for example (ConnectionManager High Water Mark),
89  * then clearState() is a No Op.
90  * </p>
91  *
92  */

93     public void clearState();
94
95 } // end MonitoredAttribute
96
Popular Tags