Framework Professional Edition Package


org.mbs.services.cu
Interface HierarchyListener

All Known Subinterfaces:
CUAdminCallback

public interface HierarchyListener

Applications interested in receiving events for changes in the hierarchy of control units (attaching of a control unit to new parent or detaching it from old one) may implement this interface and register as service in the OSGi registry. Control Unit Admin service is responsible for tracking these services and for delivering the appropriate events to the registered listeners. A service registration property may be used as a filter to limit the number of received events and to specify certain control unit and/or event types to listen for. The key of this property is ControlConstants.EVENT_FILTER with value of type String representing LDAP filtering expression. The properties which may be used in the LDAP filer are :


Field Summary
static int ATTACHED
          This constant is used as first parameter in hierarchyChanged method to indicate that the control control has attached to the given parent.
static int DETACHED
          This constant is used as first parameter in hierarchyChanged method to indicate that the control control has detached from the given parent.
 
Method Summary
 void hierarchyChanged(int eventType, java.lang.String controlUnitType, java.lang.String controlUnitID, java.lang.String parentControlUnitType, java.lang.String parentControlUnitID)
          This callback method is invoked from the ControlUnitAdmin in order to notify the registered listeners for a new hierarchy event.
 

Field Detail

DETACHED

static final int DETACHED
This constant is used as first parameter in hierarchyChanged method to indicate that the control control has detached from the given parent.

See Also:
Constant Field Values

ATTACHED

static final int ATTACHED
This constant is used as first parameter in hierarchyChanged method to indicate that the control control has attached to the given parent.

See Also:
Constant Field Values
Method Detail

hierarchyChanged

void hierarchyChanged(int eventType,
                      java.lang.String controlUnitType,
                      java.lang.String controlUnitID,
                      java.lang.String parentControlUnitType,
                      java.lang.String parentControlUnitID)
This callback method is invoked from the ControlUnitAdmin in order to notify the registered listeners for a new hierarchy event.
Hierarchy events are sent when a registered control unit changes its position in the control units' hierarchy or when a new control unit, which has a parent specified, is registered/unregistered.
ManagedControlUnits change their position in the hierarchy by modifying their ControlConstants.PARENT_TYPE and ControlConstants.PARENT_ID service registration properties.
ControlUnitFactories should notify via the hierarchyChanged(...) method of CUAdminCallback when a control unit provided by it has changed its position in the hierarchy.

Parameters:
eventType - the type of the event - either ATTACHED or DETACHED.
controlUnitType - the type of the control unit for which the event is fired
controlUnitID - the ID of the control unit for which the event is fired
parentControlUnitType - the parent control unit's type, where the change occurred
parentControlUnitID - the parent control unit's ID, where the change occurred

Framework Professional Edition Package


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