public class AdapterCapsule
extends java.lang.Object
Notifier
encapsulates the knowledge how to notify the listeners.Modifier and Type | Field and Description |
---|---|
protected java.lang.ref.WeakReference<? extends org.eclipse.emf.common.notify.Adapter> |
_listener
the listener that will be notified when an event is fired.
|
protected ListenerTypeEnum |
_listenerType
the type of the listener that will be notified.
|
protected EventManager |
_manager |
Constructor and Description |
---|
AdapterCapsule(java.lang.ref.WeakReference<? extends org.eclipse.emf.common.notify.Adapter> listener,
ListenerTypeEnum listenerType,
EventManager manager) |
Modifier and Type | Method and Description |
---|---|
void |
cancelDeferment()
This method is defined here because of convenience reasons.
|
void |
deferNotification()
This method is defined here because of convenience reasons.
|
void |
deliverDeferredEvents()
This method is defined here because of convenience reasons.
|
void |
fireEvent(org.eclipse.emf.common.notify.Notification event)
notifies the encapsulated listener about the passed event
|
java.lang.ref.WeakReference<? extends org.eclipse.emf.common.notify.Adapter> |
getListener() |
ListenerTypeEnum |
getListenerType() |
boolean |
isResponsibleFor(org.eclipse.emf.common.notify.Adapter listener,
ListenerTypeEnum listenerType)
Each Notifier is responsible for exactly one listener and its role.
|
java.lang.String |
toString() |
protected java.lang.ref.WeakReference<? extends org.eclipse.emf.common.notify.Adapter> _listener
protected ListenerTypeEnum _listenerType
protected EventManager _manager
public AdapterCapsule(java.lang.ref.WeakReference<? extends org.eclipse.emf.common.notify.Adapter> listener, ListenerTypeEnum listenerType, EventManager manager)
public java.lang.ref.WeakReference<? extends org.eclipse.emf.common.notify.Adapter> getListener()
public boolean isResponsibleFor(org.eclipse.emf.common.notify.Adapter listener, ListenerTypeEnum listenerType)
Notifier
handles the invocation of the listener's notify
method.listener
- the instance of the listenerlistenerType
- the role of the listener that shall be notifiedpublic ListenerTypeEnum getListenerType()
public void deferNotification()
public void deliverDeferredEvents()
public void cancelDeferment()
public void fireEvent(org.eclipse.emf.common.notify.Notification event)
event
- the event that will be sent to the listenerpublic java.lang.String toString()
toString
in class java.lang.Object