Framework Professional Edition Package


org.mbs.services.cu.spi
Interface ManagedControlUnit

All Superinterfaces:
ControlUnit
All Known Implementing Classes:
DefaultControlUnit, DeviceControlUnit, TokenControlUnit, TokenDeviceControlUnit

public interface ManagedControlUnit
extends ControlUnit

This interface may be registered as a OSGi service in order to make a single resource manageable through the Control Unit abstraction. The ManagedControlUnit services should not be used directly by the applications. Instead application accessed them as ControlUnit instances obtained via the ControlUnitAdmin service. The ControlUnitAdmin service is responsible for tracking all ManagedControlUnit services registered in the service registry of the framework and to notify registered ControlUnitListeners when a new ManagedControlUnit appeared or an existing was unregistered. To be properly handled by the Control Unit Admin service the ManagedControlUnit service must be registered with the following required properties:

Optionally the registration properties may contain properties ControlConstants.PARENT_ID and ControlConstants.PARENT_TYPE, both with values of type String specifying the parent control unit in the control unit hierarchy.

Note that the control units exported through ManagedControlUnit may specify only one control unit as a parent, while Control Units registered by a ControlUnitFactory may have more then one parents.

ManagedControlUnits may dynamically change their parent by modifying PARENT_TYPE and/or PARENT_ID in their service registration properties.

Control Units wich support versioning of their type should additionaly register with the property ControlConstants.VERSION with value of type String.


Method Summary
 void setControlUnitCallback(CUAdminCallback adminCallback)
          Supplies the Control Unit admin callback interface to the implementation of the ManagedControlUnit service.
 
Methods inherited from interface org.mbs.services.cu.ControlUnit
getId, getType, invokeAction, queryStateVariable
 

Method Detail

setControlUnitCallback

void setControlUnitCallback(CUAdminCallback adminCallback)
Supplies the Control Unit admin callback interface to the implementation of the ManagedControlUnit service.
This method is invoked by the Control Unit Admin bundle with a non-null argument after registration of the ManagedControlUnit service or after startup of the Control Unit Admin for already registered control units.
It is supposed that the Managed Control Unit will assign this reference to an instance variable and use it later to notify the Control Unit Admin for changes in the state variables of the Control Unit.
The method is invoked with a null argument during unregistration of the ManagedControlUnit service or when the Control Unit Admin is stopped.

Parameters:
adminCallback - reference to the control unit callback interface or null if previously set reference is not longer valid.

Framework Professional Edition Package


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