|
||||||||||
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:
INotification
s the IMediator
has interest in.
Additionally, IMediator
s 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 |
setViewComponent(java.lang.Object viewComponent)
Set the IMediator 's view component. |
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
- java.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 handled
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |