org.ioc.commons.flowcontrol.operationmanager.OperationManagerBinder 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.operationmanager;
import org.ioc.commons.flowcontrol.common.BindRegistration;
/**
* Binder for operations
*
* @author Jesús Lunar Pérez
*
* @param
* Operation type
*/
public interface OperationManagerBinder> extends HasPendingOperations {
/**
* Binds an operation
*
* @param operation
* Operation
* @param handler
* Handler which will process the beginning and the end of the
* operation
* @return A bind registration object for managing the new binding
* registered.
*/
BindRegistration bindOperation(O operation, OperationHandler handler);
/**
* Binds an operation and automatically unbind it when it finishes.
*
* @param operation
* Operation
* @param handler
* Handler which will process the beginning and the end of the
* operation
* @return A bind registration object for managing the new binding
* registered.
*/
BindRegistration bindOperationOnce(O operation, OperationHandler handler);
/**
* Binding for all operations. The handler will be fired when the first
* operation begins running and when the last operation ends.
*
* @param handler
* Handler which will process the beginning and the end of the
* first and last operations.
* @return A bind registration object for managing the new binding
* registered.
*/
BindRegistration bindOperationsRunning(OperationHandler handler);
}