< prev index next >

src/java.corba/share/classes/com/sun/corba/se/spi/monitoring/MonitoredAttribute.java

Print this page




  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 package com.sun.corba.se.spi.monitoring;
  26 
  27 import com.sun.corba.se.spi.monitoring.MonitoredAttributeInfo;
  28 import java.util.*;
  29 
  30 /**
  31  * <p>
  32  *
  33  * @author Hemanth Puttaswamy
  34  * </p>
  35  * <p>
  36  * Monitored Attribute is the interface to represent a Monitorable
  37  * Attribute. Using this interface, one can get the value of the attribute
  38  * and set the value if it is a writeable attribute.
  39  * </p>
  40  */
  41 public interface MonitoredAttribute {
  42 
  43   ///////////////////////////////////////
  44   // operations
  45 
  46 /**
  47  * <p>
  48  * Gets the Monitored Attribute Info for the attribute.
  49  * </p>
  50  * <p>
  51  *
  52  * @param monitoredAttributeInfo for this Monitored Attribute.
  53  * </p>
  54  */
  55     public MonitoredAttributeInfo getAttributeInfo();
  56 /**
  57  * <p>
  58  * Sets the value for the Monitored Attribute if isWritable() is false, the
  59  * method will throw ILLEGAL Operation exception.
  60  *
  61  * Also, the type of 'value' should be same as specified in the
  62  * MonitoredAttributeInfo for a particular instance.
  63  * </p>
  64  * <p>
  65  *
  66  * @param value should be any one of the Basic Java Type Objects which are
  67  * Long, Double, Float, String, Integer, Short, Character, Byte.
  68  * </p>
  69  */
  70     public void setValue(Object value);
  71 
  72 
  73 /**
  74  * <p>
  75  * Gets the value of the Monitored Attribute. The value can be obtained
  76  * from different parts of the module. User may choose to delegate the call
  77  * to getValue() to other variables.
  78  *
  79  * NOTE: It is important to make sure that the type of Object returned in
  80  * getvalue is same as the one specified in MonitoredAttributeInfo for this
  81  * attribute.
  82  * </p>
  83  * <p>
  84  *
  85  * </p>
  86  * <p>
  87  *
  88  * @param value is the current value for this MonitoredAttribute
  89  * </p>
  90  */
  91     public Object getValue();
  92 /**
  93  * <p>
  94  * Gets the name of the Monitored Attribute.
  95  * </p>
  96  * <p>
  97  *
  98  * @param name of this Attribute
  99  * </p>
 100  */
 101     public String getName();
 102 /**
 103  * <p>
 104  * If this attribute needs to be cleared, the user needs to implement this
 105  * method to reset the state to initial state. If the Monitored Attribute
 106  * doesn't change like for example (ConnectionManager High Water Mark),
 107  * then clearState() is a No Op.
 108  * </p>
 109  *
 110  */
 111     public void clearState();
 112 
 113 } // end MonitoredAttribute


  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 package com.sun.corba.se.spi.monitoring;
  26 
  27 import com.sun.corba.se.spi.monitoring.MonitoredAttributeInfo;
  28 import java.util.*;
  29 
  30 /**


  31  * @author Hemanth Puttaswamy
  32  *

  33  * Monitored Attribute is the interface to represent a Monitorable
  34  * Attribute. Using this interface, one can get the value of the attribute
  35  * and set the value if it is a writeable attribute.

  36  */
  37 public interface MonitoredAttribute {
  38 
  39   ///////////////////////////////////////
  40   // operations
  41 
  42 /**

  43  * Gets the Monitored Attribute Info for the attribute.


  44  *
  45  * @param monitoredAttributeInfo for this Monitored Attribute.

  46  */
  47     public MonitoredAttributeInfo getAttributeInfo();
  48 /**

  49  * Sets the value for the Monitored Attribute if isWritable() is false, the
  50  * method will throw ILLEGAL Operation exception.
  51  *
  52  * Also, the type of 'value' should be same as specified in the
  53  * MonitoredAttributeInfo for a particular instance.


  54  *
  55  * @param value should be any one of the Basic Java Type Objects which are
  56  * Long, Double, Float, String, Integer, Short, Character, Byte.

  57  */
  58     public void setValue(Object value);
  59 
  60 
  61 /**

  62  * Gets the value of the Monitored Attribute. The value can be obtained
  63  * from different parts of the module. User may choose to delegate the call
  64  * to getValue() to other variables.
  65  *
  66  * NOTE: It is important to make sure that the type of Object returned in
  67  * getvalue is same as the one specified in MonitoredAttributeInfo for this
  68  * attribute.





  69  *
  70  * @param value is the current value for this MonitoredAttribute

  71  */
  72     public Object getValue();
  73 /**

  74  * Gets the name of the Monitored Attribute.


  75  *
  76  * @return name of this Attribute

  77  */
  78     public String getName();
  79 /**

  80  * If this attribute needs to be cleared, the user needs to implement this
  81  * method to reset the state to initial state. If the Monitored Attribute
  82  * doesn't change like for example (ConnectionManager High Water Mark),
  83  * then clearState() is a No Op.


  84  */
  85     public void clearState();
  86 
  87 } // end MonitoredAttribute
< prev index next >