|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ChangeBroker
A Change Broker maintains sets of observers. Based on incoming notifications it forwards the
notification to the observers based on strategies.
There are two kinds of observers: regular EMFObservers and ReadOnlyEMFObservers.
EMFObservers may change the EMF model and therefore trigger further notifications. To prevent circular updates
between EMFObservers, notifications that arrive while the
handleNotification method is
called, will not be forwarded to non ReadOnlyEMFObservers.
ReadOnlyEMFObservers are not allowed to change the EMF model. They will receive all notifications at any time.
| Method Summary | |
|---|---|
void |
continueNotification()
Notifying the EMFObservers is started again if stopNotification() was called
beforehand. |
void |
continueNotification(Object blocker)
Removes a blocker. |
void |
stopNotification()
Stops notifying all EMFObservers. |
void |
stopNotification(Object blocker)
Stops notifying all EMFObservers. |
void |
subscribe(EMFObserver observer)
Adds an EMFObserver that will receive all notifications. |
void |
subscribeToEClass(EMFObserver observer,
org.eclipse.emf.ecore.EClass eClass)
Adds an EMFObserver that will receive notifications of notifiers with the given EClass. |
void |
subscribeToFeature(EMFObserver observer,
org.eclipse.emf.ecore.EStructuralFeature feature)
Adds an EMFObserver that will receive notifications when the given EStructuralFeautre is effected. |
void |
subscribeToTree(EMFObserver observer,
org.eclipse.emf.ecore.EClass eClass)
Adds an EMFObserver that will receive notifications of notifiers with the given EClass or which are
contained (either direct or indirect) in an EObject of the given EClass. |
void |
unsubsribe(EMFObserver observer)
Removes an observer. |
| Method Detail |
|---|
void subscribe(EMFObserver observer)
EMFObserver that will receive all notifications. Does nothing if already registered.
observer - the observer
void subscribeToEClass(EMFObserver observer,
org.eclipse.emf.ecore.EClass eClass)
EMFObserver that will receive notifications of notifiers with the given EClass. Does nothing if
already registered.
observer - the observereClass - the required EClass of the notifier
void subscribeToTree(EMFObserver observer,
org.eclipse.emf.ecore.EClass eClass)
EMFObserver that will receive notifications of notifiers with the given EClass or which are
contained (either direct or indirect) in an EObject of the given EClass. Does nothing if
already registered.
observer - the observereClass - the required EClass of the notifier or of one of its parents
void subscribeToFeature(EMFObserver observer,
org.eclipse.emf.ecore.EStructuralFeature feature)
EMFObserver that will receive notifications when the given EStructuralFeautre is effected. Does
nothing if
already registered.
observer - the observerfeature - the feature to receive changes forvoid unsubsribe(EMFObserver observer)
observer - the receivervoid stopNotification()
EMFObservers. ReadOnlyEMFObservers will still
be notified.
void continueNotification()
EMFObservers is started again if stopNotification() was called
beforehand. Has no effect if the notification process has been blocked or if
stopNotification() wasn't called before.
void stopNotification(Object blocker)
EMFObservers. ReadOnlyEMFObservers will still
be notified. The notifications will we blocked until continueNotification(Object) has been called with
all blocking elements. Using the same blocker multiple times has no effect.
blocker - the key object used to block all notificationsvoid continueNotification(Object blocker)
blocker. When all blockers have been removed the
notification process will continue. This method calls continueNotification() internally in all cases,
even if the given blocker object was not used as a blocker beforehand.
blocker - the blocker object to remove.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||