Class Distributor
- java.lang.Object
-
- org.somda.sdc.biceps.common.event.Distributor
-
public class Distributor extends Object
Utility class to distribute any BICEPS MDIB events.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidregisterObserver(Object observer)Registers an observer to MDIB modification events.voidsendDescriptionModificationEvent(MdibAccess mdibAccess, List<MdibEntity> insertedEntities, List<MdibEntity> updatedEntities, List<MdibEntity> deletedEntities)Creates a DescriptionModificationMessage and sends it to all subscribers.voidsendStateModificationEvent(MdibAccess mdibAccess, MdibStateModifications.Type changeType, List<?> states)Creates a specific StateModificationMessage based on the change type and sends it to all subscribers.voidunregisterObserver(Object observer)Unregisters an observer from MDIB modification events.
-
-
-
Method Detail
-
registerObserver
public void registerObserver(Object observer)
Registers an observer to MDIB modification events.- Parameters:
observer- to unregister
-
unregisterObserver
public void unregisterObserver(Object observer)
Unregisters an observer from MDIB modification events.- Parameters:
observer- to unregister
-
sendDescriptionModificationEvent
public void sendDescriptionModificationEvent(MdibAccess mdibAccess, List<MdibEntity> insertedEntities, List<MdibEntity> updatedEntities, List<MdibEntity> deletedEntities)
Creates a DescriptionModificationMessage and sends it to all subscribers.- Parameters:
mdibAccess- the MDIB access forAbstractMdibAccessMessage.insertedEntities- all inserted entities.updatedEntities- all updated entities.deletedEntities- all deleted entities.
-
sendStateModificationEvent
public void sendStateModificationEvent(MdibAccess mdibAccess, MdibStateModifications.Type changeType, List<?> states)
Creates a specific StateModificationMessage based on the change type and sends it to all subscribers.- Parameters:
mdibAccess- the MDIB access forAbstractMdibAccessMessage.changeType- the change type where to derive the message type from.states- all updates states.
-
-