stella.parameter
Class SimpleRemoteSwitch
java.lang.Object
util.PropertyContainer
util.PropertyResources
util.PropertyBundles
stella.parameter.AbstractParameter
stella.parameter.AbstractRemoteParameter
stella.parameter.AbstractRemoteTrigger
stella.parameter.SimpleRemoteTrigger
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.
|
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.AbstractParameter |
createParameter, delivers, getFormatted, getFormatted, getName, getPreserveFile, getString, getString, register, setName, toString |
| 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 |
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
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