|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.puremvc.java.multicore.patterns.observer.Notifier
org.puremvc.java.multicore.patterns.mediator.Mediator
public class Mediator
A base IMediator implementation.
View| Field Summary | |
|---|---|
protected String |
mediatorName
The name of the Mediator. |
static String |
NAME
The default name of the Mediator. |
protected Object |
viewComponent
The view component |
| Fields inherited from class org.puremvc.java.multicore.patterns.observer.Notifier |
|---|
multitonKey |
| Constructor Summary | |
|---|---|
Mediator()
Default constructor. |
|
Mediator(String mediatorName,
Object viewComponent)
Constructor. |
|
| Method Summary | |
|---|---|
String |
getMediatorName()
Get the name of the Mediator. |
Object |
getViewComponent()
Get the Mediator's view component. |
void |
handleNotification(INotification notification)
Handle INotifications. |
void |
init(String mediatorName,
Object viewComponent)
|
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(Object viewComponent)
Set the IMediator's view component. |
| Methods inherited from class org.puremvc.java.multicore.patterns.observer.Notifier |
|---|
getFacade, initializeNotifier, 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.multicore.interfaces.INotifier |
|---|
initializeNotifier, sendNotification, sendNotification, sendNotification |
| Field Detail |
|---|
public static final String NAME
Mediator.
protected String mediatorName
Mediator.
protected Object viewComponent
| Constructor Detail |
|---|
public Mediator()
public Mediator(String mediatorName,
Object viewComponent)
mediatorName - viewComponent - | Method Detail |
|---|
public void init(String mediatorName,
Object viewComponent)
public final String getMediatorName()
Mediator.
getMediatorName in interface IMediatorpublic void setViewComponent(Object viewComponent)
IMediator's view component.
setViewComponent in interface IMediatorObject - the view componentpublic 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 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 | |||||||||