|
Framework Professional Edition Package |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface StateVariableListener
StateVariableListeners are registered as OSGi Services. The control unit
uses whiteboard pattern to notify the listeners, i.e. Control Unit Admin
is responsible for tracking these services and to deliver them the appropriate
events to them.
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 state variables 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.TYPE,
{org.mbs.services.cu.ControlConstants#ID} and
{org.mbs.services.cu.ControlConstants#STATE_VARIABLE_ID}
The listener will be notified only for changes in the value of the state variables
whose id and type of the corresponding control unit and id
of the state variable satisfies this filter. If property
ControlConstants.EVENT_FILTER does not present,
the listener will receive events for changing of all state variables.
Listeners may use the ControlConstants.EVENT_SYNC
property to specify that events are to be delivered synchronously.
| Field Summary | |
|---|---|
static java.lang.String |
RECEIVE_VALUES_ON_REGISTER
StateVariableListeners' which wish to receive upon registration the values of the state variables for which they are listening should have this property in their service registration properties (the value of the property doesn't matter). |
| Method Summary | |
|---|---|
void |
stateVariableChanged(java.lang.String controlUnitType,
java.lang.String controlUnitID,
java.lang.String stateVariableID,
java.lang.Object value)
This is the listener's callback method. |
| Field Detail |
|---|
static final java.lang.String RECEIVE_VALUES_ON_REGISTER
| Method Detail |
|---|
void stateVariableChanged(java.lang.String controlUnitType,
java.lang.String controlUnitID,
java.lang.String stateVariableID,
java.lang.Object value)
controlUnitType - Control Unit type.controlUnitID - id of the Control Unit which variable has changed.stateVariableID - id of the changed state variable.value - the new value of the state variable.
|
Framework Professional Edition Package |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||