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

org.zodiac.sdk.async.promises.Logic Maven / Gradle / Ivy

package org.zodiac.sdk.async.promises;

/**
 * Logic which is run by a promise.
 *
 */
public interface Logic {

    /**
     * Perform the operation that this promise, or step in a chained promise
     * does.
     * 
     * @param data The input data
     * @param next This object's trigger() method must always
     * be called once this logic has run, to trigger the next one
     * @param context The PromiseContext, which can be used for Logic implementations
     * to communicate with each other
     * @throws Exception If something goes wrong, in which case the owning
     * promise's FailureHandler will be invoked.
     */
    public void run(T data, Trigger next, PromiseContext context) throws Exception;
    
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy