Class IMediator
source code
object --+
|
INotifier --+
|
IMediator
- Known Subclasses:
-
The interface definition for a PureMVC Mediator.
In PureMVC, IMediator
implementors assume these
responsibilities:
Implement a common method which returns a list of all
INotification
s the IMediator
has interest
in.
Implement a notification callback method.
Implement methods that are called when the IMediator is registered or
removed from the View.
Additionally, IMediator
s typically:
Act as an intermediary between one or more view components such as
text boxes or list controls, maintaining references and coordinating
their behavior.
In Flash-based apps, this is often the place where event listeners are
added to view components, and their handlers implemented.
Respond to and generate INotifications
, interacting with
of the rest of the PureMVC app.
When an IMediator
is registered with the
IView
, the IView
will call the
IMediator
's listNotificationInterests
method.
The IMediator
will return an List
of
INotification
names which it wishes to be notified
about.
The IView
will then create an Observer
object encapsulating that IMediator
's
(handleNotification
) method and register it as an Observer
for each INotification
name returned by
listNotificationInterests
.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Inherited from INotifier :
initializeNotifier ,
sendNotification
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__init__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|
Inherited from object :
__class__
|
Get the IMediator instance name.
Raises NotImplemented if subclass does not implement this
method.
- Returns:
- the
IMediator instance name
|
Get the IMediator 's view component.
Raises NotImplemented if subclass does not implement this
method.
- Returns:
- Object the view component
|
Set the IMediator 's view component.
Raises NotImplemented if subclass does not implement this
method.
- Parameters:
viewComponent - the view component
|
List INotification interests.
Raises NotImplemented if subclass does not implement this
method.
- Returns:
- an
List of the INotification names this
IMediator has an interest in.
|
Handle an INotification .
Raises NotImplemented if subclass does not implement this
method.
- Parameters:
notification - the INotification to be handled
|
Called by the View when the Mediator is registered.
Raises NotImplemented if subclass does not implement this
method.
|
Called by the View when the Mediator is removed.
Raises NotImplemented if subclass does not implement this
method.
|