Protected Readonly_namethe mediator name
Protected Optional_viewThe view component
ProtectedmultitonThe Multiton Key for this app
Protected StaticMULTITON_Message Constants
StaticNAMEThe default name for the mediator.
the mediator name
The name of the mediator.
Get the 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:
The view component.
Set the Mediator's view component.
The new view component.
Handle Notifications.
Typically, this will be handled in a switch statement,
with one 'case' entry per Notification
the Mediator is interested in.
The notification to handle.
Initialize this Notifier instance.
This is how a Notifier gets its multitonKey. Calls to sendNotification or to access the facade will fail until after this method has been called.
Mediators, Commands or Proxies may override this method in order to send notifications or access the Multiton Facade instance as soon as possible. They CANNOT access the facade in their constructors, since this method will not yet have been called.
the multitonKey for this Notifier to use
Create and send an Notification.
Keeps us from having to construct new Notification instances in our implementation code.
The name of the notification to be sent.
Optionalbody: anyOptional data to be included with the notification.
Optionaltype: stringOptional type of the notification.
A base
Mediatorimplementation.See
View
Mediator