stella.parameter
Class SimpleRemoteSwitch

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.AbstractRemoteTrigger
                          extended by stella.parameter.SimpleRemoteTrigger
                              extended by stella.parameter.SimpleRemoteSwitch
All Implemented Interfaces:
Cloneable, Remote, Parameter, RemoteParameter, RemoteTrigger, Switch, Trigger, ExitCleaning, Initializable, LocalizedSupplying, PropertySupplying, Reloadable, ResourceSupplying, RmiCaster

public class SimpleRemoteSwitch
extends SimpleRemoteTrigger
implements Switch

A helper class providing a simulated switch that can be exported remotely. Switching the switch is the same as setting the trigger. Time-out is ignored.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.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.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 stella.rmi.RemoteTrigger
NAMING_EXTENSION
 
Fields inherited from interface util.ResourceSupplying
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Constructor Summary
SimpleRemoteSwitch()
          Constructs a simple parameter without any properteis.
SimpleRemoteSwitch(boolean startval)
          Constructs a simple trigger without parameters and set to the startup value.
SimpleRemoteSwitch(Map prop)
          Constructs a simple parameter without any specific need for the properties argument.
 
Method Summary
 void init()
          If we have no export property, we export ourself.
 boolean turnOff()
          Turn off is the same as setTrigger to false.
 boolean turnOn(long timeout)
          Turn on is the same as setTrigger to true.
 
Methods inherited from class stella.parameter.SimpleRemoteTrigger
get, getElapsedToggleTime, getLastToggleTime, getTrigger, isTrue, rescanned, set, setTrigger, toggleTrigger
 
Methods inherited from class stella.parameter.AbstractRemoteTrigger
remoteGetTrigger, remoteIsTrue, remoteToggleTime
 
Methods inherited from class stella.parameter.AbstractRemoteParameter
addRmiListener, bindToRegistry, exit, isValid, remoteGet, removeRmiListener, 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.Trigger
getElapsedToggleTime, getLastToggleTime, getTrigger, isTrue, setTrigger, toggleTrigger
 
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.Reloadable
reload
 
Methods inherited from interface stella.rmi.RemoteParameter
addRmiListener, remoteGet, removeRmiListener
 
Methods inherited from interface util.rmi.RmiCaster
bindToRegistry, isValid, unbindFromRegistry
 
Methods inherited from interface util.ResourceSupplying
getResource, getResourceAsStream, getResources
 

Constructor Detail

SimpleRemoteSwitch

public SimpleRemoteSwitch()
                   throws RemoteException
Constructs a simple parameter without any properteis.

Throws:
RemoteException

SimpleRemoteSwitch

public SimpleRemoteSwitch(boolean startval)
                   throws RemoteException
Constructs a simple trigger without parameters and set to the startup value. The argumental primitive boolean is converted into a Boolean object.

Throws:
RemoteException

SimpleRemoteSwitch

public SimpleRemoteSwitch(Map prop)
                   throws RemoteException
Constructs a simple parameter without any specific need for the properties argument. Exporting of the switch is done in the super constructor.

Throws:
RemoteException
Method Detail

init

public void init()
Description copied from class: SimpleRemoteTrigger
If we have no export property, we export ourself.

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

turnOn

public boolean turnOn(long timeout)
Turn on is the same as setTrigger to true.

Specified by:
turnOn in interface Switch
Parameters:
timeout - The maximum time the switch should be on (ms), zero for unlimited.
Returns:
True

turnOff

public boolean turnOff()
Turn off is the same as setTrigger to false.

Specified by:
turnOff in interface Switch
Returns:
True