io.machinecode.then.api.ExecutablePromise Maven / Gradle / Ivy
package io.machinecode.then.api;
import java.util.concurrent.Callable;
/**
* A {@link Promise} that exposes a computational task suitable for execution by an {@link java.util.concurrent.ExecutorService}.
*
* @author Brent Douglas
* @since 1.0
*/
public interface ExecutablePromise extends Promise {
/**
* @return The computation as a {@link Runnable}.
*/
Runnable asRunnable();
/**
* @return The computation as a {@link Callable}.
*/
Callable asCallable();
}