org.isam.exehda.services.tips
Class TipsMonitor

java.lang.Object
  |
  +--org.isam.exehda.services.tips.TipsMonitor
All Implemented Interfaces:
Collector.Monitor

public class TipsMonitor
extends java.lang.Object
implements Collector.Monitor


Constructor Summary
TipsMonitor()
           
TipsMonitor(DataManager dataM)
           
 
Method Summary
 CellInformationBase.ResourceName getName()
          Returns the name of the monitor.
 Collector.Sensor getSensor(java.lang.String name)
          Returns the sensor described by name, if it does exist.
 java.lang.Object getSensorParameter(Collector.SensorParameter p)
          Queries the current value of a sensor parameter.
 Collector.SensorParameter[] getSensorParameters(Collector.Sensor s)
          Returns the set of parameters supported by the given sensor.
 Collector.Sensor[] getSensors()
          Returns an array containing the sensors this monitor currently provides.
 void installSensor(java.lang.String name, java.lang.String impl, java.util.Hashtable params)
          Asks for a sensor to be installed.
 boolean isSensorEnabled(Collector.Sensor s)
          Returns the current enabling status of a sensor (i.e. enabled or disabled)
 Collector.MonitoringData probeSensor(Collector.Sensor s, Collector.MonitoringData d)
          Queries the current value of a sensor (i.e. the monitoring data extracted by the sensor).
 void quantumExpired()
          Notifies the monitor that a monitoring quantum has expired, so sensors' current values must be updated.
 void setSensorEnabled(Collector.Sensor s, boolean enable)
          Enables/disables a sensor.
 void setSensorParameter(Collector.SensorParameter p, java.lang.Object v)
          Sets the value of a sensor parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TipsMonitor

public TipsMonitor()

TipsMonitor

public TipsMonitor(DataManager dataM)
Method Detail

getName

public CellInformationBase.ResourceName getName()
Description copied from interface: Collector.Monitor
Returns the name of the monitor. The monitor's name defines the namespace for sensors exported by the monitor. Its also used to control which kind of sensors the monitor whould be able to install on-demand.

Specified by:
getName in interface Collector.Monitor
Returns:
the monitor's name

getSensors

public Collector.Sensor[] getSensors()
Description copied from interface: Collector.Monitor
Returns an array containing the sensors this monitor currently provides. The set of supported sensors may grow due to new sensor install requests.

Specified by:
getSensors in interface Collector.Monitor
Returns:
currently available sensors

getSensor

public Collector.Sensor getSensor(java.lang.String name)
Description copied from interface: Collector.Monitor
Returns the sensor described by name, if it does exist.

Specified by:
getSensor in interface Collector.Monitor
Parameters:
name - sensor name
Returns:
a Sensor object or null if there is no such sensor

getSensorParameter

public java.lang.Object getSensorParameter(Collector.SensorParameter p)
Description copied from interface: Collector.Monitor
Queries the current value of a sensor parameter.

Specified by:
getSensorParameter in interface Collector.Monitor
Parameters:
p - a SensorParameter object
Returns:
the current parameter value or null if there is no such parameter

getSensorParameters

public Collector.SensorParameter[] getSensorParameters(Collector.Sensor s)
Description copied from interface: Collector.Monitor
Returns the set of parameters supported by the given sensor.

Specified by:
getSensorParameters in interface Collector.Monitor
Parameters:
s - a valid sensor object
Returns:
an array of SensorParameter objects describing the supported parameters.

setSensorParameter

public void setSensorParameter(Collector.SensorParameter p,
                               java.lang.Object v)
Description copied from interface: Collector.Monitor
Sets the value of a sensor parameter.

Specified by:
setSensorParameter in interface Collector.Monitor
Parameters:
p - a SensorParameter object
v - the new parameter value

setSensorEnabled

public void setSensorEnabled(Collector.Sensor s,
                             boolean enable)
Description copied from interface: Collector.Monitor
Enables/disables a sensor. Only enabled sensors produce monitoring data.

Specified by:
setSensorEnabled in interface Collector.Monitor
Parameters:
s - a Sensor value
enable - a boolean value

isSensorEnabled

public boolean isSensorEnabled(Collector.Sensor s)
Description copied from interface: Collector.Monitor
Returns the current enabling status of a sensor (i.e. enabled or disabled)

Specified by:
isSensorEnabled in interface Collector.Monitor
Parameters:
s - a Sensor object
Returns:
true if the sensor is enabled, false otherwise.

probeSensor

public Collector.MonitoringData probeSensor(Collector.Sensor s,
                                            Collector.MonitoringData d)
Description copied from interface: Collector.Monitor
Queries the current value of a sensor (i.e. the monitoring data extracted by the sensor). In order to minimize memory consumption, if a Monitoring data is provided, that object is updated with the current sensor value and returned. If null is provided, a new MonitoringData is allocated for hold the sensor value.

Specified by:
probeSensor in interface Collector.Monitor
Parameters:
s - a Sensor object
d - a MonitoringData object or null
Returns:
a MonitoringData object describind the current sensor value

installSensor

public void installSensor(java.lang.String name,
                          java.lang.String impl,
                          java.util.Hashtable params)
Description copied from interface: Collector.Monitor
Asks for a sensor to be installed. This operation would fail if the underlaying monitor does not support on-demand installation of sensors.

Specified by:
installSensor in interface Collector.Monitor
Parameters:
name - a String value
impl - a String value
params - a Hashtable value

quantumExpired

public void quantumExpired()
Description copied from interface: Collector.Monitor
Notifies the monitor that a monitoring quantum has expired, so sensors' current values must be updated.

Specified by:
quantumExpired in interface Collector.Monitor