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

com.cyngn.vertx.async.promise.PromiseAction Maven / Gradle / Ivy

There is a newer version: 0.6.0
Show newest version
package com.cyngn.vertx.async.promise;

import io.vertx.core.json.JsonObject;

import java.util.function.Consumer;

/**
 * The contract of a discrete action to be executed in a Promise
 *
 * @author [email protected] (Jeremy Truelove) 7/30/15
 */
public interface  PromiseAction {
    /**
     * The action to execute.
     *
     * @param context general purpose object for populating with data that can be used by other actions in a promise or
     *                for communicating the result
     * @param onResult the callback that collects the result of any given PromiseAction necessary for
     *                 continuing or completing the chain of actions in a promise.
     */
    void execute(JsonObject context, Consumer onResult);
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy