|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IMediator
The interface definition for a PureMVC Mediator.
In PureMVC, IMediator implementors assume these
responsibilities:
INotifications the IMediator has interest in.
Additionally, IMediators typically:
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 Array 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.
A concrete IMediator implementor usually looks something like this:
INotification| Method Summary | |
|---|---|
java.lang.String |
getMediatorName()
Get the IMediator instance name |
java.lang.Object |
getViewComponent()
Get the IMediator's view component. |
void |
handleNotification(INotification notification)
Handle an INotification. |
java.lang.String[] |
listNotificationInterests()
List INotification interests. |
void |
onRegister()
Called by the View when the Mediator is registered |
void |
onRemove()
Called by the View when the Mediator is removed |
void |
setViewComponent(java.lang.Object viewComponent)
Set the IMediator's view component. |
| Methods inherited from interface org.puremvc.java.interfaces.INotifier |
|---|
sendNotification, sendNotification, sendNotification |
| Method Detail |
|---|
java.lang.String getMediatorName()
IMediator instance name
IMediator instance namejava.lang.Object getViewComponent()
IMediator's view component.
void setViewComponent(java.lang.Object viewComponent)
IMediator's view component.
viewComponent - The view componentjava.lang.String[] listNotificationInterests()
INotification interests.
Array of the INotification names
this IMediator has an interest in.void handleNotification(INotification notification)
INotification.
notification - the INotification to be handledvoid onRegister()
void onRemove()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||