com.xebialabs.deployit.task
Class ExecutionEngine

java.lang.Object
  extended by com.xebialabs.deployit.task.ExecutionEngine

@Component
public class ExecutionEngine
extends java.lang.Object


Constructor Summary
ExecutionEngine()
           
 
Method Summary
 void abortExecution(java.lang.String taskId)
           
 void cancel(java.lang.String taskId)
           
 void execute(java.lang.String id)
          Starts the execution of the given task
 java.util.List<Task> getAllIncompleteTasksForCurrentUser()
           
protected  UsernameAndPasswordCredentials getCurrentCredentials()
           
 Task getTask(java.lang.String id)
          Retrieves the task with the given id
 java.lang.String register(Task task)
          Registers a task with the engine.
 void shutdownTasks()
           
 void stopExecution(java.lang.String taskId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecutionEngine

public ExecutionEngine()
Method Detail

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()