Framework Professional Edition Package


org.mbs.services.cu
Interface ControlUnitListener

All Known Subinterfaces:
CUAdminCallback

public interface ControlUnitListener

Applications interested in receiving events for creating and/or deleting of a specified set of Control Unit instances may implement this interface and register as service in the OSGi registry. Control Unit Admin service is responsible for tracking these services and to deliver them 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 to listen for. The key of the 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 ControlConstants.EVENT_TYPE, ControlConstants.TYPE and ControlConstants.ID. The filter states what types of events, and events for which units to be received. The listener will be notified only for events regarding Control Units whose id and type satisfies this filter, if the events match the event filtering criterion. If property ControlConstants.EVENT_FILTER does not present, the listener will receive events for all control units. Listeners may use the ControlConstants.EVENT_SYNC property to specify that events are to be delivered synchronously.


Field Summary
static int CONTROL_UNIT_ADDED
          This constant is used as first parameter in controlUnitEvent method to indicate that a new control unit is available.
static int CONTROL_UNIT_REMOVED
          This constant is used as first parameter in controlUnitEvent method when to indicate that a control unit is not available anymore.
static int CONTROL_UNIT_TYPE_APPEARED
          This constant is used as first parameter in controlUnitEvent method to indicate that a new control unit type is available.
static int CONTROL_UNIT_TYPE_DISAPPEARED
          This constant is used as first parameter in controlUnitEvent method to indicate that control units of the given type are no more available.
 
Method Summary
 void controlUnitEvent(int eventType, java.lang.String controlUnitType, java.lang.String controUnitID)
          Invoked by the Control Unit admin service when a Control Unit instance has been created or removed.
 

Field Detail

CONTROL_UNIT_ADDED

static final int CONTROL_UNIT_ADDED
This constant is used as first parameter in controlUnitEvent method to indicate that a new control unit is available.

See Also:
Constant Field Values

CONTROL_UNIT_REMOVED

static final int CONTROL_UNIT_REMOVED
This constant is used as first parameter in controlUnitEvent method when to indicate that a control unit is not available anymore.

See Also:
Constant Field Values

CONTROL_UNIT_TYPE_APPEARED

static final int CONTROL_UNIT_TYPE_APPEARED
This constant is used as first parameter in controlUnitEvent method to indicate that a new control unit type is available. When the event is of this type the parameter of controlUnitEvent method specifying a control unit id is null.

See Also:
Constant Field Values

CONTROL_UNIT_TYPE_DISAPPEARED

static final int CONTROL_UNIT_TYPE_DISAPPEARED
This constant is used as first parameter in controlUnitEvent method to indicate that control units of the given type are no more available. When the event is of this type the parameter of controlUnitEvent method specifying a control unit id is null.

See Also:
Constant Field Values
Method Detail

controlUnitEvent

void controlUnitEvent(int eventType,
                      java.lang.String controlUnitType,
                      java.lang.String controUnitID)
Invoked by the Control Unit admin service when a Control Unit instance has been created or removed.

Parameters:
eventType - one of CONTROL_UNIT_ADDED, CONTROL_UNIT_REMOVED, CONTROL_UNIT_TYPE_APPEARED or CONTROL_UNIT_TYPE_DISAPPEARED
controlUnitType - the type of the Control Unit instance
controUnitID - the id of the Control Unit instance

Framework Professional Edition Package


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