Fulfill the use-case initiated by the given Notification
.
In the Command Pattern, an application use-case typically
begins with some user action, which results in a Notification
being broadcast, which
is handled by business logic in the execute
method of an
Command
.
The notification containing the data or command details to be processed.
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.
Optional
body: anyOptional data to be included with the notification.
Optional
type: stringOptional type of the notification.
A base
Command
implementation.Your subclass should override the
execute
method where your business logic will handle theNotification
.See
SimpleCommand