Class Notifier
- All Implemented Interfaces:
INotifier
- Direct Known Subclasses:
MacroCommand
,Mediator
,Proxy
,SimpleCommand
public class Notifier extends java.lang.Object implements INotifier
A Base INotifier
implementation.
MacroCommand, Command, Mediator
and Proxy
all
have a need to send Notifications
.
The INotifier
interface provides a common method called
sendNotification
that relieves implementation code of the
necessity to actually construct Notifications
.
The Notifier
class, which all of the above mentioned classes
extend, provides an initialized reference to the Facade
Singleton, which is required for the convienience method for sending
Notifications
, but also eases implementation as these classes
have frequent Facade
interactions and usually require access
to the facade anyway.
- See Also:
Facade
,Mediator
,Proxy
,SimpleCommand
,MacroCommand
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Notifier()
-
Method Summary
Modifier and Type Method Description void
sendNotification(java.lang.String notificationName)
Send anINotification
s.void
sendNotification(java.lang.String notificationName, java.lang.Object body)
Send anINotification
s.void
sendNotification(java.lang.String notificationName, java.lang.Object body, java.lang.String type)
Send anINotification
s.
-
Field Details
-
facade
Local reference to the Facade Singleton
-
-
Constructor Details
-
Notifier
public Notifier()
-
-
Method Details
-
sendNotification
public void sendNotification(java.lang.String notificationName, java.lang.Object body, java.lang.String type)Send an
INotification
s.Keeps us from having to construct new notification instances in our implementation code.
- Specified by:
sendNotification
in interfaceINotifier
- Parameters:
notificationName
- the name of the notiification to sendbody
- the body of the notificationtype
- the type of the notification
-
sendNotification
public void sendNotification(java.lang.String notificationName, java.lang.Object body)Send an
INotification
s.Keeps us from having to construct new notification instances in our implementation code.
- Specified by:
sendNotification
in interfaceINotifier
- Parameters:
notificationName
- the name of the notiification to sendbody
- the body of the notification
-
sendNotification
public void sendNotification(java.lang.String notificationName)Send an
INotification
s.Keeps us from having to construct new notification instances in our implementation code.
- Specified by:
sendNotification
in interfaceINotifier
- Parameters:
notificationName
- the name of the notiification to send
-