|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ocl.examples.eventmanager.framework.AdapterCapsule
public class AdapterCapsule
The Notifier
encapsulates the knowledge how to notify the listeners.
Field Summary | |
---|---|
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 Summary | |
---|---|
AdapterCapsule(java.lang.ref.WeakReference<? extends org.eclipse.emf.common.notify.Adapter> listener,
ListenerTypeEnum listenerType,
EventManager manager)
|
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.lang.ref.WeakReference<? extends org.eclipse.emf.common.notify.Adapter> _listener
protected ListenerTypeEnum _listenerType
protected EventManager _manager
Constructor Detail |
---|
public AdapterCapsule(java.lang.ref.WeakReference<? extends org.eclipse.emf.common.notify.Adapter> listener, ListenerTypeEnum listenerType, EventManager manager)
Method Detail |
---|
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 notified
public ListenerTypeEnum getListenerType()
public void deferNotification()
connection
- public void deliverDeferredEvents()
connection
- public void cancelDeferment()
connection
- 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |