Package step.client.executions
Class RemoteExecutionManager
- java.lang.Object
-
- step.client.AbstractRemoteClient
-
- step.client.executions.RemoteExecutionManager
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class RemoteExecutionManager extends AbstractRemoteClient
This class provides an API for the execution of plans existing on a remote controller
-
-
Field Summary
-
Fields inherited from class step.client.AbstractRemoteClient
client, cookies, credentials
-
-
Constructor Summary
Constructors Constructor Description RemoteExecutionManager()
RemoteExecutionManager(ControllerCredentials credentials)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
execute(java.lang.String planId)
Executes a plan located on the controllerjava.lang.String
execute(java.lang.String planId, java.util.Map<java.lang.String,java.lang.String> executionParameters)
Executes a plan located on the controllerjava.lang.String
execute(ExecutionParameters executionParameterObject)
(Advanced) Executes a plan located on the controller using the providedExecutionParameters
objectjava.lang.String
executeFromExternalRepository(java.lang.String repositoryId, java.util.Map<java.lang.String,java.lang.String> repositoryParameters)
Executes a plan located on an external repositoryjava.lang.String
executeFromExternalRepository(java.lang.String repositoryId, java.util.Map<java.lang.String,java.lang.String> repositoryParameters, java.util.Map<java.lang.String,java.lang.String> executionParameters)
Executes a plan located on an external repositoryExecution
get(java.lang.String executionId)
protected ControllerCredentials
getControllerCredentials()
RemoteExecutionFuture
getFuture(java.lang.String executionId)
Returns a future representing of the executionjava.util.Map<ReportNodeStatus,java.lang.Integer>
getStatusReport(java.lang.String executionId, java.lang.String reportNodeClass)
void
stop(java.lang.String executionId)
Stop an executionExecution
waitForTermination(java.lang.String executionID, long timeout)
Waits for an execution to terminate-
Methods inherited from class step.client.AbstractRemoteClient
close, executeRequest, notImplemented, requestBuilder, requestBuilder
-
-
-
-
Constructor Detail
-
RemoteExecutionManager
public RemoteExecutionManager()
-
RemoteExecutionManager
public RemoteExecutionManager(ControllerCredentials credentials)
-
-
Method Detail
-
execute
public java.lang.String execute(java.lang.String planId)
Executes a plan located on the controller- Parameters:
planId
- the ID of the plan to be executed.- Returns:
- the execution ID of the execution
-
execute
public java.lang.String execute(java.lang.String planId, java.util.Map<java.lang.String,java.lang.String> executionParameters)
Executes a plan located on the controller- Parameters:
planId
- the ID of the plan to be executed.executionParameters
- the execution parameters (the drop-downs that are set on the execution screen in the UI)- Returns:
- the execution ID of the execution
-
executeFromExternalRepository
public java.lang.String executeFromExternalRepository(java.lang.String repositoryId, java.util.Map<java.lang.String,java.lang.String> repositoryParameters)
Executes a plan located on an external repository- Parameters:
repositoryId
- the ID of the repository the Plan is located onrepositoryParameters
- the parameters to be passed to the repository to locate the plan- Returns:
- the execution ID of the execution
-
executeFromExternalRepository
public java.lang.String executeFromExternalRepository(java.lang.String repositoryId, java.util.Map<java.lang.String,java.lang.String> repositoryParameters, java.util.Map<java.lang.String,java.lang.String> executionParameters)
Executes a plan located on an external repository- Parameters:
repositoryId
- the ID of the repository the Plan is located onrepositoryParameters
- the parameters to be passed to the repository to locate the planexecutionParameters
- the execution parameters (the drop-downs that are set on the execution screen in the UI)- Returns:
- the execution ID of the execution
-
execute
public java.lang.String execute(ExecutionParameters executionParameterObject)
(Advanced) Executes a plan located on the controller using the providedExecutionParameters
object- Parameters:
executionParameterObject
- theExecutionParameters
- Returns:
- the execution ID of the execution
-
stop
public void stop(java.lang.String executionId)
Stop an execution- Parameters:
executionId
- the ID of the execution to be stopped
-
get
public Execution get(java.lang.String executionId)
- Parameters:
executionId
- the ID of the execution- Returns:
- the
Execution
-
getStatusReport
public java.util.Map<ReportNodeStatus,java.lang.Integer> getStatusReport(java.lang.String executionId, java.lang.String reportNodeClass)
- Parameters:
executionId
- the ID of the executionreportNodeClass
- the classname of theReportNode
to be queried- Returns:
- the distribution of
ReportNodeStatus
for theReportNode
s specified as argument
-
waitForTermination
public Execution waitForTermination(java.lang.String executionID, long timeout) throws java.util.concurrent.TimeoutException, java.lang.InterruptedException
Waits for an execution to terminate- Parameters:
executionID
-timeout
- the timeout in ms- Returns:
- Throws:
java.util.concurrent.TimeoutException
java.lang.InterruptedException
-
getFuture
public RemoteExecutionFuture getFuture(java.lang.String executionId)
Returns a future representing of the execution- Parameters:
executionId
-- Returns:
-
getControllerCredentials
protected ControllerCredentials getControllerCredentials()
-
-