com.xebialabs.deployit.task
Class ExecutionEngine
java.lang.Object
com.xebialabs.deployit.task.ExecutionEngine
@Component
public class ExecutionEngine
- extends java.lang.Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExecutionEngine
public ExecutionEngine()
register
public java.lang.String register(Task task)
- Registers a task with the engine.
- Parameters:
task - the task to register
- Returns:
- the ID assigned to the task
getTask
public Task getTask(java.lang.String id)
- Retrieves the task with the given id
- Parameters:
id - the id of the task to retrieve
- Returns:
- the task or null if it cannot be retrieved.
getCurrentCredentials
protected UsernameAndPasswordCredentials getCurrentCredentials()
execute
public void execute(java.lang.String id)
- Starts the execution of the given task
- Parameters:
id - the id of the task to start that was registered before using register(Task)
stopExecution
public void stopExecution(java.lang.String taskId)
abortExecution
public void abortExecution(java.lang.String taskId)
cancel
public void cancel(java.lang.String taskId)
getAllIncompleteTasksForCurrentUser
public java.util.List<Task> getAllIncompleteTasksForCurrentUser()
shutdownTasks
@PreDestroy
public void shutdownTasks()