Framework Professional Edition Package


org.mbs.services.device.abstractdriver
Class DeviceControlUnit

java.lang.Object
  extended by org.mbs.services.cu.generator.ServiceObject
      extended by org.mbs.services.cu.generator.DefaultControlUnit
          extended by org.mbs.services.device.abstractdriver.DeviceControlUnit
All Implemented Interfaces:
ControlConstants, ControlUnit, ManagedControlUnit
Direct Known Subclasses:
TokenDeviceControlUnit

public class DeviceControlUnit
extends DefaultControlUnit

This class represents a device control unit.

Since:
$Date: 2004/08/30 08:09:33 $
Author:
Stoyan Zoubev

Field Summary
 
Fields inherited from class org.mbs.services.cu.generator.DefaultControlUnit
ACTION_PREFIX, CHECK_INPUT, controller, controllerMethods, model
 
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
 
Constructor Summary
DeviceControlUnit(AbstractDeviceModel model, AbstractDeviceController controller, DeviceStateGraph stateGraph)
          Creates the device control unit.
 
Method Summary
 java.lang.Object invokeAction(java.lang.String actionId, java.lang.Object args)
          Executes the specified action over this control unit.
 
Methods inherited from class org.mbs.services.cu.generator.DefaultControlUnit
checkActionInputArguments, fillDefaultProperties, getId, getType, queryStateVariable, release, setControlUnitCallback
 
Methods inherited from class org.mbs.services.cu.generator.ServiceObject
registerService, unregisterService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeviceControlUnit

public DeviceControlUnit(AbstractDeviceModel model,
                         AbstractDeviceController controller,
                         DeviceStateGraph stateGraph)
Creates the device control unit.

Parameters:
model - model of the device
controller - controller of the device
stateGraph - the device state graph
Method Detail

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 DefaultControlUnit
Parameters:
actionId - the id of the action
args - 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)

Framework Professional Edition Package


Copyright © 1999-2007 ProSyst Software GmbH. All Rights Reserved