package jrummikub.util;

/** Interface for classes that can generate parameterless events */
public interface IEvent {
	/**
	 * Start to publish all events to a given listener
	 * 
	 * @param listener
	 *          target listener
	 * @return a connection to remove the listener
	 */
	public Connection add(IListener listener);

	/**
	 * Stop publishing events to a given listener
	 * 
	 * @param listener
	 *          target listener
	 */
	public void remove(IListener listener);
}
