stella.roof
Class AbstractShelter

java.lang.Object
  extended by util.PropertyContainer
      extended by stella.roof.AbstractShelter
All Implemented Interfaces:
Cloneable, Sheltering, Initializable, PropertyBearing, StatusProviding
Direct Known Subclasses:
DomeReceiver, RoofReceiver

public abstract class AbstractShelter
extends PropertyContainer
implements Sheltering

An abstract implementation of the RoofOperating interface. This class extends CastingContainer to implement the PropertyBearing interface and allow sub-classes to act as error casters. It provides a single-argument constructor, with a Map object as the argument. To make construction out of a properties file more convenient, a static #createRoofOperator method is given.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.PropertyContainer
PropertyContainer.URLResource
 
Field Summary
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR, KEY_NOINITONCREATE, KEY_RESOURCEBUNDLES
 
Fields inherited from interface util.PropertyBearing
CONFIG, KEY_CLASS, KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Constructor Summary
protected AbstractShelter(Map<String,String> prop)
          Constructs a new weather watching instance with the specified properties.
 
Method Summary
static Sheltering createShelter(Map<String,String> prop)
          Constructs a new weather watching instance using the mapping of the PropertyBearing.KEY_CLASS to the class name to derive the class to instantiate.
 
Methods inherited from class util.PropertyContainer
augment, augment, augment, clone, createFrom, createFrom, createFrom, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getLocalClassLoader, getLocalized, getLocalized, getLocalizedString, getLocalizedString, getProperties, getPropertiesToKey, getPropertiesToKey, getProperty, getResource, getResourceAsStream, getResourceFromKey, getResources, has, init, isNew, keyCreate, keyCreate, parseObject, reload, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface stella.roof.Sheltering
close, getLastCloseTime, getLastOpenTime, isClosed, isOpen, open
 
Methods inherited from interface util.StatusProviding
provideStatus
 

Constructor Detail

AbstractShelter

protected AbstractShelter(Map<String,String> prop)
Constructs a new weather watching instance with the specified properties. The PropertyBearing.KEY_CLASS is always mapped when this constructer is used.

Method Detail

createShelter

public static final Sheltering createShelter(Map<String,String> prop)
Constructs a new weather watching instance using the mapping of the PropertyBearing.KEY_CLASS to the class name to derive the class to instantiate. If this property is defined, a new RoofOperating instance with the stated class name is created, the supplied properties used as an argument in the constructor. Can throw a lot of exceptions if unsuccessful.