stella.parameter
Class RemoteSensorStatistic

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by stella.parameter.AbstractParameter
                  extended by stella.parameter.AbstractValue
                      extended by stella.parameter.StatisticValue
                          extended by stella.parameter.SensorStatistic
                              extended by stella.parameter.RemoteSensorStatistic
All Implemented Interfaces:
Cloneable, EventListener, DataListener, ErrorDependingParameter, Parameter, Value, ExitCleaning, Initializable, LocalizedSupplying, PropertySupplying, Reloadable, ResourceSupplying
Direct Known Subclasses:
RemoteSensorAverage, RemoteSensorMaximum

public abstract class RemoteSensorStatistic
extends SensorStatistic
implements Reloadable

This value registers to a sensor that is a RmiDataCaster. DataEvents received must be RawDataEvents. From these, the physical value is added to the underlying StatisticValue. Concrete subclasses may return average or min/max of accumulated data.

Note that this class can only work within the MasterMind or CCDMaster, the latter only if the averageing thread is reset by an error-event generated by the CCDMaster.


Nested Class Summary
 
Nested classes/interfaces inherited from class stella.parameter.StatisticValue
StatisticValue.Average, StatisticValue.Maximum, StatisticValue.Median, StatisticValue.Minimum
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private  MyRmiListener listen
          The rmi-listener & reference watcher for binding to the sensor.
 
Fields inherited from class stella.parameter.StatisticValue
KEY_ERROR, KEY_THRESHOLD
 
Fields inherited from class stella.parameter.AbstractParameter
KEY_FORMAT, KEY_NAME, KEY_PRESERVE, UNKNOWN
 
Fields inherited from class util.PropertyBundles
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES
 
Fields inherited from class util.PropertyResources
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR
 
Fields inherited from interface stella.ErrorDependingParameter
NAMING_EXTENSION
 
Fields inherited from interface util.PropertySupplying
CONFIG, KEY_CLASS
 
Fields inherited from interface util.ResourceSupplying
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Constructor Summary
protected RemoteSensorStatistic(Map info)
          Constructs a new sensor statistic.
 
Method Summary
 void exit()
          For orderly shutdown, de-register from the binding reference.
 void init()
          Initializes this parameter.
 double rescanned(String key, String old, String newval)
          If the listener reference has changed, we reinit the binding or pass the changed key to the listener properties.
 
Methods inherited from class stella.parameter.SensorStatistic
dataAvailable
 
Methods inherited from class stella.parameter.StatisticValue
getAverage, getForError, getMaximum, getMedian, getMinimum, getSigma, isValid, registerError, setValue
 
Methods inherited from class stella.parameter.AbstractValue
get, set
 
Methods inherited from class stella.parameter.AbstractParameter
createParameter, delivers, getFormatted, getFormatted, getName, getPreserveFile, getString, getString, register, setName, toString
 
Methods inherited from class util.PropertyBundles
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource
 
Methods inherited from class util.PropertyResources
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, keyCreate, keyCreate, reload, setApplet
 
Methods inherited from class util.PropertyContainer
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, reload, removeProperty, setObject, setProperties, setProperty, stringProperties
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface util.Reloadable
reload
 
Methods inherited from interface stella.Parameter
get, getFormatted, getName, getString, set
 
Methods inherited from interface util.PropertySupplying
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties
 
Methods inherited from interface stella.Value
getValue
 
Methods inherited from interface util.ResourceSupplying
getResource, getResourceAsStream, getResources
 

Field Detail

listen

private MyRmiListener listen
The rmi-listener & reference watcher for binding to the sensor.

Constructor Detail

RemoteSensorStatistic

protected RemoteSensorStatistic(Map info)
Constructs a new sensor statistic. Sensor data is gathered at every call to SensorStatistic.dataAvailable(stella.DataEvent)

Method Detail

rescanned

public double rescanned(String key,
                        String old,
                        String newval)
If the listener reference has changed, we reinit the binding or pass the changed key to the listener properties.

Specified by:
rescanned in interface Reloadable
Overrides:
rescanned in class AbstractParameter

init

public void init()
Initializes this parameter. This means binding to the remote reference.

Specified by:
init in interface Initializable
Overrides:
init in class AbstractParameter

exit

public void exit()
For orderly shutdown, de-register from the binding reference. Simply call the exit method of the listen helper object.

Specified by:
exit in interface ExitCleaning
Overrides:
exit in class AbstractParameter