org.ioc.commons.flowcontrol.common.Callback 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;
/**
* Interface for callbacks on asynchronous calls.
*
* @author Jesús Lunar Pérez
*
* @param On success object type.
* @param On failure object type.
*/
public interface Callback {
/**
* Invoked when the asynchronous call has been completed successfuly.
*
* @param result The result ob
*/
public void onSuccess(S result);
/**
* Invoked when the asynchronous call has been completed with a failure.
* @param failure
*/
public void onFailure(F failure);
}