IObserver class

The interface definition for a PureMVC MultiCore Observer.

In PureMVC, IObserver implementors assume these responsibilities:

  • Encapsulate the notification (callback) method of the interested object.
  • Encapsulate the notification context (this) of the interested object.
  • Provide methods for setting the interested object's notification method and context.
  • Provide a method for notifying the interested object.

The Observer Pattern as implemented within PureMVC exists to support publish/subscribe communication between actors.

An IObserver is an object that encapsulates information about an interested object with a notification (callback) method that should be called when an INotification is broadcast. The IObserver then acts as a conduit for notifying the interested object.

IObservers can receive Notifications by having their notifyObserver method invoked, passing in an object implementing the INotification interface.

See IView, INotification





hashCode int
The hash code for this object. [...]
read-only, inherited
notifyContext Object
This IObserver's notifyContext (i.e., caller)
read / write
notifyMethod Function
This IObserver's notifyMethod (i.e., callback)
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


compareNotifyContext(Object object) bool
Compare a given object to the notifyContext (caller) object. [...]
getNotifyContext() Object
Get the notification context. [...]
getNotifyMethod() Function
Get the notification method. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
notifyObserver(INotification note) → void
Notify the interested object. [...]
setNotifyContext(Object caller) → void
Set the notification context. [...]
setNotifyMethod(Function callback) → void
Set the notification method. [...]
toString() String
A string representation of this object. [...]


operator ==(Object other) bool
The equality operator. [...]