Package com.sun.corba.se.spi.monitoring
Class MonitoredAttributeBase
java.lang.Object
com.sun.corba.se.spi.monitoring.MonitoredAttributeBase
- All Implemented Interfaces:
MonitoredAttribute
- Direct Known Subclasses:
LongMonitoredAttributeBase,StatisticMonitoredAttribute,StringMonitoredAttributeBase
- 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 Summary
ConstructorsConstructorDescriptionMonitoredAttributeBase(String name, MonitoredAttributeInfo info) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidIf the concrete class decides not to provide the implementation of this method, then it's OK.Gets the MonitoredAttributeInfo for the attribute.getName()Gets the name of the attribute.abstract ObjectgetValue()This method should be implemented by the concrete class.voidThis method should be implemented by the concrete class only if the attribute is writable.
-
Constructor Details
-
MonitoredAttributeBase
Constructor.
-
-
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:
clearStatein interfaceMonitoredAttribute
-
getValue
This method should be implemented by the concrete class.- Specified by:
getValuein interfaceMonitoredAttribute
-
setValue
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:
setValuein interfaceMonitoredAttribute- Parameters:
value- should be any one of the Basic Java Type Objects which are Long, Double, Float, String, Integer, Short, Character, Byte.
-
getAttributeInfo
Gets the MonitoredAttributeInfo for the attribute.- Specified by:
getAttributeInfoin interfaceMonitoredAttribute
-
getName
Gets the name of the attribute.- Specified by:
getNamein interfaceMonitoredAttribute
-