org.ioc.commons.flowcontrol.actioncontroller.ActionControllerBinder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ioc-commons Show documentation
Show all versions of ioc-commons Show documentation
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.
package org.ioc.commons.flowcontrol.actioncontroller;
import org.ioc.commons.flowcontrol.common.BindRegistration;
/**
* Binder for actions.
*
* @author Jesús Lunar Pérez
*
* @param Action type
*/
public interface ActionControllerBinder> {
/**
* Binds an action to the handler which will process it when it is invoked.
*
* @param action
* Action to bind
* @param handler
* Handler which will process the action
*
* @return A bind registration object for managing the new binding registered.
*/
BindRegistration bindAction(A action, ActionHandler handler);
/**
* Binds an action to the handler which will process it when it is invoked and automatically unbind it when it finishes.
*
* @param action
* Action to bind
* @param handler
* Handler which will process the action
*
* @return A bind registration object for managing the new binding registered.
*/
BindRegistration bindActionOnce(A action, ActionHandler handler);
}