stella.parameter
Class AbstractRemoteSwitch

java.lang.Object
  extended by util.PropertyContainer
      extended by stella.parameter.AbstractParameter
          extended by stella.parameter.AbstractRemoteParameter
              extended by stella.parameter.AbstractRemoteTrigger
                  extended by stella.parameter.AbstractRemoteSwitch
All Implemented Interfaces:
Cloneable, Remote, Parameter, RemoteParameter, RemoteSwitch, RemoteTrigger, Switch, Trigger, ExitCleaning, Initializable, PropertyBearing, RmiCaster
Direct Known Subclasses:
JFrameParameter, SwitchSkeleton

public abstract class AbstractRemoteSwitch
extends AbstractRemoteTrigger
implements RemoteSwitch, Switch

An abstract implementation of a remote switch. Diverts remote capabilities to local Switch methods.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.PropertyContainer
PropertyContainer.URLResource
 
Field Summary
 
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.PropertyContainer
KEY_LISTSEPARATOR, KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR, KEY_NOINITONCREATE, KEY_RESOURCEBUNDLES
 
Fields inherited from interface stella.rmi.RemoteTrigger
NAMING_EXTENSION
 
Fields inherited from interface util.PropertyBearing
CONFIG, KEY_CLASS, KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Constructor Summary
protected AbstractRemoteSwitch(Map prop)
          Constructs a new remote switch.
 
Method Summary
 boolean switchOff()
          The remote switching is diverted to the local Switch.turnOff().
 boolean switchOn(long maxtime)
          The remote switching is diverted to the local Switch.turnOn(long).
 
Methods inherited from class stella.parameter.AbstractRemoteTrigger
remoteGetTrigger, remoteIsTrue, remoteToggleTime
 
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.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, isNew, keyCreate, keyCreate, parseObject, reload, 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.rmi.RemoteTrigger
remoteGetTrigger, remoteIsTrue, remoteToggleTime
 
Methods inherited from interface stella.rmi.RemoteParameter
addRmiListener, remoteGet, removeRmiListener
 
Methods inherited from interface util.rmi.RmiCaster
bindToRegistry, isValid, unbindFromRegistry
 
Methods inherited from interface stella.Switch
turnOff, turnOn
 
Methods inherited from interface stella.Trigger
getElapsedToggleTime, getLastToggleTime, getTrigger, isTrue, setTrigger, toggleTrigger
 
Methods inherited from interface stella.Parameter
get, getFormatted, getName, getString, set
 
Methods inherited from interface util.PropertyBearing
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getLocalized, getProperties, getProperty, getResource, getResourceAsStream, getResources, has, parseObject, removeProperty, setObject, setProperty, stringProperties
 
Methods inherited from interface util.Initializable
init
 

Constructor Detail

AbstractRemoteSwitch

protected AbstractRemoteSwitch(Map prop)
Constructs a new remote switch. Sets the binding properties. Binding is done in the #bind method, which is called only in the AbstractRemoteParameter.init() section.

Method Detail

switchOn

public boolean switchOn(long maxtime)
                 throws RemoteException
The remote switching is diverted to the local Switch.turnOn(long).

Specified by:
switchOn in interface RemoteSwitch
Parameters:
maxtime - The maximum illumination time, in ms. Zero for unlimitied.
Returns:
True, if turning on of the switch was successful.
Throws:
RemoteException

switchOff

public boolean switchOff()
                  throws RemoteException
The remote switching is diverted to the local Switch.turnOff().

Specified by:
switchOff in interface RemoteSwitch
Returns:
True, if turning off of the light was successful.
Throws:
RemoteException