com.sefford.common.interfaces.Postable Maven / Gradle / Ivy
package com.sefford.common.interfaces;
/**
* Postable interface done to abstract a notification interface.
*
* This is done to separate the notification system and avoid the callbacks. Typically this is intended
* to use it straightforward with an Event Bus as https://github.com/greenrobot/EventBus or
* http://square.github.io/otto/.
*
* In this way the developer will be able to notify of events to upper layers of the domain without
* falling into a Callback hell
*
* @author Saul Diaz
*/
public interface Postable {
/**
* Posts an object to the notification manager.
*
* @param event Event to send through the notification system.
*/
void post(Object event);
}