Protected OptionalcontrollerReference to Controller
Protected OptionalmodelReference to Model
Protected OptionalviewReference to View
Protected StaticinstanceSingleton instance
Protected StaticSINGLETON_Message Constants
ProtectedinitializeInitialize the Controller.
Called by the initializeFacade method.
Override this method in your subclass of Facade
if one or both of the following are true:
Controller.Commands to register with the Controller at startup.`.If you don't want to initialize a different Controller,
call super.initializeController() at the beginning of your
method, then register Commands.
ProtectedinitializeProtectedinitializeInitialize the Model.
Called by the initializeFacade method.
Override this method in your subclass of Facade
if one or both of the following are true:
Model.Proxys to register with the Model that do not
retrieve a reference to the Facade at construction time.`If you don't want to initialize a different Model,
call super.initializeModel() at the beginning of your
method, then register Proxys.
Note: This method is rarely overridden; in practice you are more
likely to use a Command to create and register Proxys
with the Model, since Proxys with mutable data will likely
need to send Notifications and thus will likely want to fetch a reference to
the Facade during their construction.
ProtectedinitializeInitialize the View.
Called by the initializeFacade method.
Override this method in your subclass of Facade
if one or both of the following are true:
View.Observers to register with the ViewIf you don't want to initialize a different View,
call super.initializeView() at the beginning of your
method, then register Mediator instances.
Note: This method is rarely overridden; in practice you are more
likely to use a Command to create and register Mediators
with the View, since Mediator instances will need to send
Notifications and thus will likely want to fetch a reference
to the Facade during their construction.
Notify Observers.
This method is left public mostly for backward compatibility, and to allow you to send custom notification classes using the facade.
Usually you should just call sendNotification
and pass the parameters, never having to
construct the notification yourself.
The notification to be sent to observers.
Register a Mediator with the View.
The mediator instance to be registered.
Register a Proxy with the Model by name.
The proxy instance to be registered.
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.
Staticget
A base Singleton
Facadeimplementation.See
Facade