public class RunServiceImpl extends Object implements RunService
RunService
.EVENT_TOPIC_ROOT, RUN_CLOSED, RUN_CREATED, RUN_DELETED, RUN_OPENED, RUN_PAUSED, RUN_RESUMED, RUN_STARTED, RUN_STOPPED
Constructor and Description |
---|
RunServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
cancel(String runID)
Cancels a running or paused run.
|
void |
close(String runID)
Closes a run.
|
String |
createRun(RunProfile runProfile)
Creates a new run and returns the ID for the run.
|
void |
delete(String runID)
Deletes a run.
|
Bundle |
getDataBundle(String runID)
Returns the
Bundle containing the data values of the run. |
Set<ExecutionEnvironment> |
getExecutionEnvironments()
Returns the available
ExecutionEnvironment s. |
Set<ExecutionEnvironment> |
getExecutionEnvironments(Profile profile)
Returns the
ExecutionEnvironment s that can execute the
specified Profile . |
Set<ExecutionEnvironment> |
getExecutionEnvironments(WorkflowBundle workflowBundle)
Returns the
ExecutionEnvironment s that can execute the
specified WorkflowBundle using its default
Profile . |
Profile |
getProfile(String runID) |
String |
getRunName(String runID) |
List<String> |
getRuns()
Returns the list of runs that this service is managing.
|
State |
getState(String runID)
Returns the current state of the run.
|
Workflow |
getWorkflow(String runID) |
WorkflowReport |
getWorkflowReport(String runID)
Returns the status report for the run.
|
String |
open(Path runFile)
Opens a run and returns the ID for the run.
|
void |
pause(String runID)
Pauses a running run.
|
void |
resume(String runID)
Resumes a paused run.
|
void |
save(String runID,
Path runFile)
Saves a run.
|
void |
setEventAdmin(org.osgi.service.event.EventAdmin eventAdmin) |
void |
setExecutionEnvironmentService(ExecutionEnvironmentService executionEnvironmentService) |
void |
setWorkflowBundleIO(WorkflowBundleIO workflowBundleIO) |
void |
start(String runID)
Starts a run.
|
public Set<ExecutionEnvironment> getExecutionEnvironments()
RunService
ExecutionEnvironment
s.getExecutionEnvironments
in interface RunService
ExecutionEnvironment
spublic Set<ExecutionEnvironment> getExecutionEnvironments(WorkflowBundle workflowBundle)
RunService
ExecutionEnvironment
s that can execute the
specified WorkflowBundle
using its default
Profile
.getExecutionEnvironments
in interface RunService
workflowBundle
- the WorkflowBundle
to find
ExecutionEnvironment
s forExecutionEnvironment
s that can execute the
specified WorkflowBundle
public Set<ExecutionEnvironment> getExecutionEnvironments(Profile profile)
RunService
ExecutionEnvironment
s that can execute the
specified Profile
.getExecutionEnvironments
in interface RunService
profile
- the Profile
to find
ExecutionEnvironment
s forExecutionEnvironment
s that can execute the
specified Profile
public List<String> getRuns()
RunService
If there are no runs this method returns an empty list.
getRuns
in interface RunService
public String createRun(RunProfile runProfile) throws InvalidWorkflowException, RunProfileException
RunService
RunService.start(String)
method.createRun
in interface RunService
runProfile
- the workflow to runInvalidWorkflowException
RunProfileException
public String open(Path runFile) throws IOException
RunService
open
in interface RunService
runFile
- the workflow run to openIOException
public void close(String runID) throws InvalidRunIdException, InvalidExecutionIdException
RunService
close
in interface RunService
runID
- the ID of the runInvalidRunIdException
- if the run ID is not validInvalidExecutionIdException
public void save(String runID, Path runFile) throws InvalidRunIdException, IOException
RunService
save
in interface RunService
runID
- the ID of the runInvalidRunIdException
- if the run ID is not validIOException
public void delete(String runID) throws InvalidRunIdException, InvalidExecutionIdException
RunService
delete
in interface RunService
runID
- the ID of the runInvalidRunIdException
- if the run ID is not validInvalidExecutionIdException
public void start(String runID) throws InvalidRunIdException, RunStateException, InvalidExecutionIdException
RunService
start
in interface RunService
runID
- the ID of the runInvalidRunIdException
- if the run ID is not validRunStateException
- if the run state is not CREATEDInvalidExecutionIdException
public void pause(String runID) throws InvalidRunIdException, RunStateException, InvalidExecutionIdException
RunService
pause
in interface RunService
runID
- the ID of the runInvalidRunIdException
- if the run ID is not validRunStateException
- if the run state is not RUNNINGInvalidExecutionIdException
public void resume(String runID) throws InvalidRunIdException, RunStateException, InvalidExecutionIdException
RunService
resume
in interface RunService
runID
- the ID of the runInvalidRunIdException
- if the run ID is not validRunStateException
- if the run state is not PAUSEDInvalidExecutionIdException
public void cancel(String runID) throws InvalidRunIdException, RunStateException, InvalidExecutionIdException
RunService
cancel
in interface RunService
runID
- the ID of the runInvalidRunIdException
- if the run ID is not validRunStateException
- if the run state is not RUNNING or PAUSEDInvalidExecutionIdException
public State getState(String runID) throws InvalidRunIdException
RunService
getState
in interface RunService
runID
- the ID of the runInvalidRunIdException
- if the run ID is not validpublic Bundle getDataBundle(String runID) throws InvalidRunIdException
RunService
Bundle
containing the data values of the run.getDataBundle
in interface RunService
runID
- the ID of the runDatabundle
containing the data values of the runInvalidRunIdException
- if the run ID is not validpublic WorkflowReport getWorkflowReport(String runID) throws InvalidRunIdException
RunService
getWorkflowReport
in interface RunService
runID
- the ID of the runInvalidRunIdException
- if the run ID is not validpublic Workflow getWorkflow(String runID) throws InvalidRunIdException
getWorkflow
in interface RunService
InvalidRunIdException
public Profile getProfile(String runID) throws InvalidRunIdException
getProfile
in interface RunService
InvalidRunIdException
public String getRunName(String runID) throws InvalidRunIdException
getRunName
in interface RunService
InvalidRunIdException
public void setExecutionEnvironmentService(ExecutionEnvironmentService executionEnvironmentService)
public void setEventAdmin(org.osgi.service.event.EventAdmin eventAdmin)
public void setWorkflowBundleIO(WorkflowBundleIO workflowBundleIO)
Copyright © 2015–2016 The Apache Software Foundation. All rights reserved.