< prev index next >

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

Print this page




  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


  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  * @return 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  * @return 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 >