![JAR search and dependency download from the Maven repository](/logo.png)
org.ioc.commons.flowcontrol.common.Receiver 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.common;
import java.util.Set;
import javax.validation.ConstraintViolation;
/**
* Interface for callbacks on asynchronous calls.
*
* @author Jesús Lunar Pérez
*
* @param On success object type.
*/
public interface Receiver extends HasSuccess, HasFailure {
/**
* The first method called when data has been received.
*
* @param success
* true if the data was received OK; false otherwise.
*/
void onEnd(boolean success);
/**
* Invoked when the asynchronous call has been completed successfuly.
*
* @param result The result object.
*/
public void success(S result);
/**
* Invoked when the asynchronous call has been completed with a failure.
* @param failure The failure object.
*/
public void failure(Throwable failure);
/**
* Method called when some constraints have been violated trying to make the
* DAO operation.
*
* @param violations
*/
void constraintViolation(Set> violations);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy