|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.puremvc.java.patterns.observer.Notifier
org.puremvc.java.patterns.mediator.Mediator
public class Mediator
A base IMediator implementation.
View| Field Summary | |
|---|---|
protected java.lang.String |
mediatorName
The name of the Mediator. |
static java.lang.String |
NAME
The default name of the Mediator. |
protected java.lang.Object |
viewComponent
The view component |
| Fields inherited from class org.puremvc.java.patterns.observer.Notifier |
|---|
facade |
| Constructor Summary | |
|---|---|
Mediator(java.lang.String mediatorName,
java.lang.Object viewComponent)
Constructor. |
|
| Method Summary | |
|---|---|
java.lang.String |
getMediatorName()
Get the name of the Mediator. |
java.lang.Object |
getViewComponent()
Get the Mediator's view component. |
void |
handleNotification(INotification notification)
Handle INotifications. |
java.lang.String[] |
listNotificationInterests()
List the INotification names this Mediator
is interested in being notified of. |
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 class org.puremvc.java.patterns.observer.Notifier |
|---|
sendNotification, sendNotification, sendNotification |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.puremvc.java.interfaces.INotifier |
|---|
sendNotification, sendNotification, sendNotification |
| Field Detail |
|---|
public static final java.lang.String NAME
Mediator.
protected java.lang.String mediatorName
Mediator.
protected java.lang.Object viewComponent
| Constructor Detail |
|---|
public Mediator(java.lang.String mediatorName,
java.lang.Object viewComponent)
mediatorName - viewComponent - | Method Detail |
|---|
public final java.lang.String getMediatorName()
Mediator.
getMediatorName in interface IMediatorpublic void setViewComponent(java.lang.Object viewComponent)
IMediator's view component.
setViewComponent in interface IMediatorviewComponent - The view componentpublic java.lang.Object getViewComponent()
Mediator's view component.
Additionally, an implicit getter will usually be defined in the subclass that casts the view object to a type, like this:
getViewComponent in interface IMediatorpublic void handleNotification(INotification notification)
INotifications.
Typically this will be handled in a switch statement, with one 'case'
entry per INotification the Mediator is
interested in.
handleNotification in interface IMediatornotification - public java.lang.String[] listNotificationInterests()
INotification names this Mediator
is interested in being notified of.
listNotificationInterests in interface IMediatorINotification namespublic void onRegister()
onRegister in interface IMediatorpublic void onRemove()
onRemove in interface IMediator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||