org.mbs.services.device.abstractdriver
Class TokenDeviceControlUnit
java.lang.Object
org.mbs.services.cu.generator.ServiceObject
org.mbs.services.cu.generator.DefaultControlUnit
org.mbs.services.device.abstractdriver.DeviceControlUnit
org.mbs.services.device.abstractdriver.TokenDeviceControlUnit
- All Implemented Interfaces:
- ControlConstants, ControlUnit, ManagedControlUnit
public class TokenDeviceControlUnit
- extends DeviceControlUnit
This is the extension of DeviceControlUnit with
token mechanism supported.
- Since:
- $Date: 2004/07/21 12:57:56 $
- Author:
- Stoyan Zoubev
| Fields inherited from interface org.mbs.services.cu.ControlConstants |
CONSTRUCTOR_PREFIX, DESTRUCTOR, EVENT_FILTER, EVENT_SYNC, EVENT_TYPE, FINDER_PREFIX, ID, PARENT_ID, PARENT_ROOT, PARENT_TYPE, STATE_VARIABLE_ID, SV_LIST_SV_ID, TYPE, VERSION |
|
Method Summary |
java.lang.Object |
invokeAction(java.lang.String actionId,
java.lang.Object args)
Executes the specified action over this control unit. |
java.lang.Object |
queryStateVariable(java.lang.String svarId)
Returns the value of a specified state variable. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TokenDeviceControlUnit
public TokenDeviceControlUnit(AbstractDeviceModel model,
AbstractDeviceController controller,
DeviceStateGraph stateGraph)
invokeAction
public java.lang.Object invokeAction(java.lang.String actionId,
java.lang.Object args)
throws java.lang.Exception
- Description copied from interface:
ControlUnit
- Executes the specified action over this control unit. Actions supported
by a control unit and the number and types of the input and output arguments of
each action are defined by the metadata of the control unit.
- Specified by:
invokeAction in interface ControlUnit- Overrides:
invokeAction in class DeviceControlUnit
- Parameters:
actionId - the id of the actionargs - the input argument(s). If the argument is only one this is
the argument itself. If the arguments are more then one, the
value must be a Object[] and arguments are retrieved
from that array.
- Returns:
- the output argument(s) or
null if the action does not
return value.
- Throws:
java.lang.Exception - if an error occurs while executing action.
java.lang.IllegalArgumentException - if this control unit does not have action
with the supplied Id or the arguments number and/or types do not match the
action arguments.- See Also:
ControlUnit.invokeAction(java.lang.String, java.lang.Object)
queryStateVariable
public java.lang.Object queryStateVariable(java.lang.String svarId)
- Description copied from interface:
ControlUnit
- Returns the value of a specified state variable. State variables supported
by a control unit and their types are defined by the metadata of the control unit.
- Specified by:
queryStateVariable in interface ControlUnit- Overrides:
queryStateVariable in class DefaultControlUnit
- Parameters:
svarId - the id of the variable
- Returns:
- value of the variable
- See Also:
org.msb.services.cu.ControlUnit#queryStateVariable(java.lang.String)
Copyright © 1999-2007 ProSyst Software GmbH. All Rights Reserved