public class SwitchStub extends TriggerStub implements Switch
RS485Switch or a OneWireSwitch. This class
provides local access to the turning the switch. This classes should always
set the blocking property to true, as we first try to get the switch's state
before we turn.ParameterStub.FingerPropertyResources.Load, PropertyResources.URLResourceKEY_UNCONNECTEDKEY_BLOCK, KEY_FORMATCLASS, KEY_FORMATPATTERN, KEY_INITTRY, KEY_REMOTENAME, KEY_RETRY, KEY_SERVERDELAY, KEY_WAIT, sensorKEY_FORMAT, KEY_NAME, KEY_PRESERVE, UNKNOWNKEY_NOINITONCREATE, POSTFIX_ALPHABET, POSTFIX_BYTES, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_MODTIME, POSTFIX_URLKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORCONFIG, KEY_CLASSKEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME| Constructor and Description |
|---|
SwitchStub(Map<String,String> prop)
Constructs a new switch stub.
|
SwitchStub(String remotename)
For convenience, we support a constructor with only the remote name.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
turnOff()
If the remote parameter we are registered to is a
RemoteSwitch,
we try to turn it. |
boolean |
turnOn(long timeout)
If the remote parameter we are registered to is a
RemoteSwitch,
we try to turn it. |
get, getElapsedToggleTime, getLastToggleTime, getTrigger, isTrue, setTrigger, toggleTriggercancel, disconnect, exit, getAsociatedThread, getFormatted, init, isConnected, maxTimeToCancel, rebind, rescanned, run, setcreateParameter, delivers, getFormatted, getName, getPreserveFile, getString, getString, overrideDefaultName, register, setName, toStringclone, createFrom, createFrom, createFrom, createInstance, getApplet, getAsResources, getLocate, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, hasLocalURLs, initProperties, keyCreate, keyCreate, reload, setAppletaugment, augment, 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, parseObject, reload, removeProperty, requires, setObject, setProperties, setProperty, stringPropertiesequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdefaultBoolean, 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, stringPropertiesinitgetElapsedToggleTime, getLastToggleTime, getTrigger, isTrue, setTrigger, toggleTriggerreloadpublic SwitchStub(String remotename) throws RemoteException, InitException
InitExceptionRemoteExceptionpublic SwitchStub(Map<String,String> prop) throws RemoteException
RemoteExceptionpublic boolean turnOn(long timeout)
RemoteSwitch,
we try to turn it. To ensure a proper handle to the remote parameter, we
first try to get the value, which ensures proper binding if the
ParameterStub.KEY_BLOCK property is true.public boolean turnOff()
RemoteSwitch,
we try to turn it. To ensure a proper handle to the remote parameter, we
first try to get the value, which ensures proper binding if the
ParameterStub.KEY_BLOCK property is true.