All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ioc.commons.flowcontrol.eventbus.EventBusBinder Maven / Gradle / Ivy

Go to download

This project defines a set of useful java interfaces for helping you in the definition of the structure of your developments in Java-projects which are designed using a Inversion-Of-Control (IOC) pattern. Useful for MVP-Pattern designs in applications coded on GWT, SWT, Android, etc.

There is a newer version: 1.2.1
Show newest version
package org.ioc.commons.flowcontrol.eventbus;

import org.ioc.commons.flowcontrol.common.BindRegistration;

/**
 * Binder for events
 * 
 * @author Jesús Lunar Pérez
 * 
 * @param 
 *            Event type
 */
public interface EventBusBinder> {
	/**
	 * Binds an event to the handler which will process it when it is fired.
	 * 
	 * @param event
	 *            Event to bind
	 * @param handler
	 *            Handler which will process the event
	 * 
	 * @return A bind registration object for managing the new binding
	 *         registered.
	 */
	BindRegistration bindEvent(E event, EventHandler handler);

	/**
	 * Binds an event to the handler which will process it when it is fired and automatically unbind it when it finishes.
	 * 
	 * @param event
	 *            Event to bind
	 * @param handler
	 *            Handler which will process the event
	 * 
	 * @return A bind registration object for managing the new binding
	 *         registered.
	 */
	BindRegistration bindEventOnce(E event, EventHandler handler);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy