Interface ExecutionService
-
- All Superinterfaces:
AppService
,FrameworkSupportService
,NodeExecutionService
- All Known Implementing Classes:
ExecutionServiceImpl
public interface ExecutionService extends FrameworkSupportService, NodeExecutionService
ExecutionService provides interface to all dispatcher and command execution services.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
SERVICE_NAME
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description DispatcherResult
dispatchToNodes(StepExecutionContext context, Dispatchable item)
Dispatch the command (execution item) to all the nodes within the context.DispatcherResult
dispatchToNodes(StepExecutionContext context, NodeStepExecutionItem item)
Dispatch the command (execution item) to all the nodes within the context.NodeExecutorResult
executeCommand(ExecutionContext context, ExecArgList command, INodeEntry node)
Execute a command within the context on the node.NodeExecutorResult
executeCommand(ExecutionContext context, java.lang.String[] command, INodeEntry node)
NodeStepResult
executeNodeStep(StepExecutionContext context, NodeStepExecutionItem item, INodeEntry node)
Interpret the execution item within the context for the given node.StepExecutionResult
executeStep(StepExecutionContext context, StepExecutionItem item)
Execute a workflow step item for the given context and return the result.java.lang.String
fileCopyFile(ExecutionContext context, java.io.File file, INodeEntry node, java.lang.String destinationPath)
Copy file to the node to a specific pathjava.lang.String[]
fileCopyFiles(ExecutionContext context, java.io.File basedir, java.util.List<java.io.File> files, java.lang.String remotePath, INodeEntry node)
Copy multiple files to the node to a specific pathjava.lang.String
fileCopyFileStream(ExecutionContext context, java.io.InputStream input, INodeEntry node, java.lang.String destinationPath)
Copy inputstream as a file to the node to a specific pathjava.lang.String
fileCopyScriptContent(ExecutionContext context, java.lang.String script, INodeEntry node, java.lang.String destinationPath)
Copy string as a file to the node to a specific path-
Methods inherited from interface com.dtolabs.rundeck.core.common.FrameworkSupportService
getName
-
-
-
-
Field Detail
-
SERVICE_NAME
static final java.lang.String SERVICE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
executeStep
StepExecutionResult executeStep(StepExecutionContext context, StepExecutionItem item) throws StepException
Execute a workflow step item for the given context and return the result.- Parameters:
context
- contextitem
- item- Returns:
- not-null result
- Throws:
StepException
- on error
-
executeNodeStep
NodeStepResult executeNodeStep(StepExecutionContext context, NodeStepExecutionItem item, INodeEntry node) throws NodeStepException
Interpret the execution item within the context for the given node.- Parameters:
context
- contextitem
- step itemnode
- node- Returns:
- result
- Throws:
NodeStepException
- on error
-
dispatchToNodes
DispatcherResult dispatchToNodes(StepExecutionContext context, NodeStepExecutionItem item) throws DispatcherException, ExecutionServiceException
Dispatch the command (execution item) to all the nodes within the context.- Parameters:
context
- contextitem
- step item- Returns:
- result
- Throws:
DispatcherException
- on dispatch errorExecutionServiceException
- on service error
-
dispatchToNodes
DispatcherResult dispatchToNodes(StepExecutionContext context, Dispatchable item) throws DispatcherException, ExecutionServiceException
Dispatch the command (execution item) to all the nodes within the context.- Parameters:
context
- contextitem
- step item- Returns:
- result
- Throws:
DispatcherException
- on dispatch errorExecutionServiceException
- on service error
-
fileCopyFileStream
java.lang.String fileCopyFileStream(ExecutionContext context, java.io.InputStream input, INodeEntry node, java.lang.String destinationPath) throws FileCopierException
Copy inputstream as a file to the node to a specific path- Specified by:
fileCopyFileStream
in interfaceNodeExecutionService
- Parameters:
context
- contextinput
- input streamnode
- nodedestinationPath
- destination path- Returns:
- filepath on the node for the destination file.
- Throws:
FileCopierException
- on error
-
fileCopyFile
java.lang.String fileCopyFile(ExecutionContext context, java.io.File file, INodeEntry node, java.lang.String destinationPath) throws FileCopierException
Copy file to the node to a specific path- Specified by:
fileCopyFile
in interfaceNodeExecutionService
- Parameters:
context
- contextfile
- input filenode
- nodedestinationPath
- destination path- Returns:
- filepath
- Throws:
FileCopierException
- on error
-
fileCopyFiles
java.lang.String[] fileCopyFiles(ExecutionContext context, java.io.File basedir, java.util.List<java.io.File> files, java.lang.String remotePath, INodeEntry node) throws FileCopierException
Copy multiple files to the node to a specific path- Parameters:
context
- contextbasedir
- base directory for copied filesfiles
- array of input filesremotePath
- remote path destination for filesnode
- node- Returns:
- list of copied paths from the remote node
- Throws:
FileCopierException
- on error
-
fileCopyScriptContent
java.lang.String fileCopyScriptContent(ExecutionContext context, java.lang.String script, INodeEntry node, java.lang.String destinationPath) throws FileCopierException
Copy string as a file to the node to a specific path- Parameters:
context
- contextscript
- script stringnode
- nodedestinationPath
- destination path- Returns:
- filepath for the copied file on the node
- Throws:
FileCopierException
- on error
-
executeCommand
NodeExecutorResult executeCommand(ExecutionContext context, java.lang.String[] command, INodeEntry node)
Deprecated.Execute a command within the context on the node.- Parameters:
context
- contextcommand
- command stringsnode
- node- Returns:
- result
-
executeCommand
NodeExecutorResult executeCommand(ExecutionContext context, ExecArgList command, INodeEntry node)
Execute a command within the context on the node.- Specified by:
executeCommand
in interfaceNodeExecutionService
- Parameters:
context
- contextcommand
- commandnode
- node- Returns:
- result
-
-