stella.sensor
Class WeatherRemainsBad

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by stella.parameter.AbstractParameter
                  extended by stella.parameter.AbstractRemoteParameter
                      extended by stella.parameter.AbstractRemoteValue
                          extended by stella.sensor.WeatherRemainsBad
All Implemented Interfaces:
Cloneable, Remote, Parameter, RemoteParameter, Value, WeatherDependingParameter, ExitCleaning, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying, RmiCaster

public class WeatherRemainsBad
extends AbstractRemoteValue
implements WeatherDependingParameter

The weather trigger exports the weather from a local WeatherSurveying instance to remote listeners.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private  WeatherPredicting station
          Normal action will register a weather station after construct.
 
Fields inherited from class stella.parameter.AbstractRemoteParameter
DEFBIND, KEY_BIND
 
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 util.PropertySupplying
CONFIG, KEY_CLASS
 
Fields inherited from interface util.ResourceSupplying
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Constructor Summary
WeatherRemainsBad(Map<String,String> prop)
          Constructs a enw weather trigger.
 
Method Summary
 Object getForWeather(WeatherSurveying weather)
          Returns true if the weather is clear according to the weather station handed over.
private  Number getFrom(WeatherPredicting wp)
           
 Number getValue()
          Diverts to #getFor with the currently registered weather station.
 void registerWeather(WeatherSurveying operator)
          Sets the roof operator where queries are diverted to.
 Number setValue(Number fo)
          throws UnsupportedOperationException();
 
Methods inherited from class stella.parameter.AbstractRemoteValue
get, set
 
Methods inherited from class stella.parameter.AbstractRemoteParameter
addRmiListener, bindToRegistry, exit, init, isValid, remoteGet, removeRmiListener, rescanned, unbindFromRegistry
 
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 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 util.Initializable
init
 
Methods inherited from interface util.ResourceSupplying
getResource, getResourceAsStream, getResources
 

Field Detail

station

private WeatherPredicting station
Normal action will register a weather station after construct.

Constructor Detail

WeatherRemainsBad

public WeatherRemainsBad(Map<String,String> prop)
                  throws RemoteException
Constructs a enw weather trigger. It can be queried only after a weather station has been registered.

Throws:
RemoteException
Method Detail

registerWeather

public void registerWeather(WeatherSurveying operator)
Sets the roof operator where queries are diverted to.

Specified by:
registerWeather in interface WeatherDependingParameter

getForWeather

public Object getForWeather(WeatherSurveying weather)
Returns true if the weather is clear according to the weather station handed over.

Specified by:
getForWeather in interface WeatherDependingParameter

getValue

public Number getValue()
Diverts to #getFor with the currently registered weather station.

Specified by:
getValue in interface Value

getFrom

private Number getFrom(WeatherPredicting wp)

setValue

public Number setValue(Number fo)
throws UnsupportedOperationException();

Specified by:
setValue in interface Value