Class MonitoredAttributeBase

java.lang.Object
com.sun.corba.se.spi.monitoring.MonitoredAttributeBase
All Implemented Interfaces:
MonitoredAttribute
Direct Known Subclasses:
LongMonitoredAttributeBase, StatisticMonitoredAttribute, StringMonitoredAttributeBase

public abstract class MonitoredAttributeBase extends Object implements MonitoredAttribute

Author:
Hemanth Puttaswamy

A Convenient class provided to help users extend and implement only getValue(), if there is no need to clear the state and the attribute is not writable.

  • Constructor Details

  • Method Details

    • clearState

      public void clearState()
      If the concrete class decides not to provide the implementation of this method, then it's OK. Some of the examples where we may decide to not provide the implementation is the connection state. Irrespective of the call to clearState, the connection state will be showing the currect state of the connection. NOTE: This method is only used to clear the Monitored Attribute state, not the real state of the system itself.
      Specified by:
      clearState in interface MonitoredAttribute
    • getValue

      public abstract Object getValue()
      This method should be implemented by the concrete class.
      Specified by:
      getValue in interface MonitoredAttribute
    • setValue

      public void setValue(Object value)
      This method should be implemented by the concrete class only if the attribute is writable. If the attribute is not writable and if this method called, it will result in an IllegalStateException.
      Specified by:
      setValue in interface MonitoredAttribute
      Parameters:
      value - should be any one of the Basic Java Type Objects which are Long, Double, Float, String, Integer, Short, Character, Byte.

    • getAttributeInfo

      public MonitoredAttributeInfo getAttributeInfo()
      Gets the MonitoredAttributeInfo for the attribute.
      Specified by:
      getAttributeInfo in interface MonitoredAttribute
    • getName

      public String getName()
      Gets the name of the attribute.
      Specified by:
      getName in interface MonitoredAttribute