Notification Class
A base INotification implementation.
The Observer Pattern as implemented within PureMVC exists to support publish/subscribe communication between actors.
INotifications are not meant to be a replacement for Event
s,
but rather an internal communication mechanism that ensures
PureMVC is portable regardless of what type of Event mechanism
is supported (or not) on a given platform.
Generally, IMediator implementors place Event
listeners on
their view components, and IProxy implementors place Event
listeners on service components. Those Event
s are then handled in
the usual way, and may lead to the broadcast of INotifications
that trigger ICommands or notify IMediators.
See IView, IObserver, Notification
Implements
Constructors
Code new Notification(String name, [body, String type]) #
Constructor.
- Param name - name of the INotification.
- Param body - the INotification body. (optional)
- Param type - the type of the INotification
Notification( String this.name, [Dynamic this.body, String this.type] ){}
Methods
Code getBody() #
Get the body of the INotification.
- Returns
Dynamic
- the body of the INotification.
Dynamic getBody() { return body; }
Code String getName() #
Get the name of the INotification.
- Returns
String
- the name of the INotification.
String getName() { return name; }
Code String getType() #
Get the type of the INotification.
- Returns
String
- the type of the INotification.
String getType() { return type; }
Code void setBody(bodyObject) #
Set the body of the INotification.
- Param body - the body of the INotification.
void setBody( Dynamic bodyObject ) { body = bodyObject; }
Code void setType(String noteType) #
Set the type of the INotification.
- Param type - the type of the INotification.
void setType( String noteType ) { type = noteType; }