49 lines
1.1 KiB
Java
49 lines
1.1 KiB
Java
package org.gcube.common.workspacetaskexecutor;
|
|
|
|
import org.gcube.common.workspacetaskexecutor.shared.exception.ItemNotExecutableException;
|
|
|
|
|
|
|
|
/**
|
|
* The Interface ExecutableTask.
|
|
*
|
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
|
* Apr 27, 2018
|
|
* @param <T> the generic type
|
|
*/
|
|
public interface ExecutableTask<T> {
|
|
|
|
|
|
/**
|
|
* Do run.
|
|
*
|
|
* @param itemId the item id
|
|
* @return the o
|
|
* @throws ItemNotExecutableException the item not executable
|
|
* @throws Exception the exception
|
|
*/
|
|
T doRun(String itemId) throws ItemNotExecutableException, Exception;
|
|
|
|
|
|
/**
|
|
* Stop run.
|
|
*
|
|
* @param itemId the item id
|
|
* @return the boolean
|
|
* @throws ItemNotExecutableException the item not executable exception
|
|
* @throws Exception the exception
|
|
*/
|
|
Boolean stopRun(String itemId) throws ItemNotExecutableException, Exception;
|
|
|
|
/**
|
|
* Monitor run status.
|
|
*
|
|
* @param itemId the item id
|
|
* @return the t
|
|
* @throws ItemNotExecutableException the item not executable exception
|
|
* @throws Exception the exception
|
|
*/
|
|
T monitorRunStatus(String itemId) throws ItemNotExecutableException, Exception;
|
|
|
|
}
|