org.puremvc.java.interfaces.INotifier Maven / Gradle / Ivy
Show all versions of PureMVC Show documentation
//
// PureMVC Java Standard
//
// Copyright(c) 2019 Saad Shams
// Your reuse is governed by the Creative Commons Attribution 3.0 License
//
package org.puremvc.java.interfaces;
/**
* The interface definition for a PureMVC Notifier.
*
* 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, also 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 IFacade IFacade
* @see org.puremvc.java.interfaces.INotification INotification
*/
public interface INotifier {
/**
* Send a INotification
.
*
* Convenience method to prevent having to construct new
* notification instances in our implementation code.
*
* @param notificationName the name of the notification to send
* @param body the body of the notification
* @param type the type of the notification
*/
void sendNotification(String notificationName, Object body, String type);
/**
* Send a INotification
.
*
* Convenience method to prevent having to construct new
* notification instances in our implementation code.
*
* @param notificationName the name of the notification to send
* @param body the body of the notification
*/
void sendNotification(String notificationName, Object body);
/**
* Send a INotification
.
*
* Convenience method to prevent having to construct new
* notification instances in our implementation code.
*
* @param notificationName the name of the notification to send
*/
void sendNotification(String notificationName);
}