stella.parameter
Class RemoteSensorStub
java.lang.Object
util.PropertyContainer
util.PropertyResources
util.PropertyBundles
stella.parameter.AbstractParameter
stella.parameter.AbstractValue
stella.parameter.DataValue
stella.parameter.RemoteSensorStub
- All Implemented Interfaces:
- Cloneable, EventListener, DataListener, Parameter, Value, ExitCleaning, Initializable, LocalizedSupplying, PropertySupplying, Reloadable, ResourceSupplying
public class RemoteSensorStub
- extends DataValue
- implements Reloadable
This class is a parameter stub, intended to bind to a remotely running
sensor. Similar to a ParameterStub, it tries to register at the
remote data sensor during initialization.
|
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 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 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 |
KEY_REMOTESENSOR
public static final String KEY_REMOTESENSOR
- The key pointing to the machine where the sensors run.
- See Also:
- Constant Field Values
listen
private MyRmiListener listen
- The rmi-listener & reference watcher for binding to the sensor.
RemoteSensorStub
public RemoteSensorStub(Map info)
- Constructs a new sensor global. If the sensor this global should wrap
could not be found in the properties, the construction fails with an
IllegalArgumentException. Additionally, the properties are
scanned for the data source key. If this key is not present or maps to
an illegal value, it is (re)mapped to
DataValue.VALUE. This guarantees
that this key is present and points to a allowed value once the
construction phase is finished.
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