|
Framework Professional Edition Package |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
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 :
ControlConstants.EVENT_TYPE - to limit the types of
events received by the listener. Valid values are DETACHED and
ATTACHED.
ControlConstants.TYPE and
ControlConstants.ID are used to limit events based on
the child control units to which the events are relevant.
ControlConstants.PARENT_TYPE and
ControlConstants.PARENT_ID can be used to specify that the
listener is only interested in receiving events about hierarchy changes regarding given
parent control units.
| 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 |
|---|
static final int DETACHED
hierarchyChanged method
to indicate that the control control has detached from the given parent.
static final int ATTACHED
hierarchyChanged method
to indicate that the control control has attached to the given parent.
| Method Detail |
|---|
void hierarchyChanged(int eventType,
java.lang.String controlUnitType,
java.lang.String controlUnitID,
java.lang.String parentControlUnitType,
java.lang.String parentControlUnitID)
ControlUnitAdmin in
order to notify the registered listeners for a new hierarchy event. 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.
eventType - the type of the event - either ATTACHED or
DETACHED.controlUnitType - the type of the control unit for which the event is firedcontrolUnitID - the ID of the control unit for which the event is firedparentControlUnitType - the parent control unit's type, where the change
occurredparentControlUnitID - the parent control unit's ID, where the change occurred
|
Framework Professional Edition Package |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||