Class ExecutionServiceImpl
- java.lang.Object
-
- com.dtolabs.rundeck.core.execution.ExecutionServiceImpl
-
- All Implemented Interfaces:
FrameworkSupportService,ExecutionService,NodeExecutionService,AppService
public class ExecutionServiceImpl extends java.lang.Object implements ExecutionService
NewExecutionServiceImpl is ...
-
-
Field Summary
-
Fields inherited from interface com.dtolabs.rundeck.core.execution.ExecutionService
SERVICE_NAME
-
-
Constructor Summary
Constructors Constructor Description ExecutionServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DispatcherResultdispatchToNodes(StepExecutionContext context, Dispatchable item)Dispatch the command (execution item) to all the nodes within the context.DispatcherResultdispatchToNodes(StepExecutionContext context, NodeStepExecutionItem item)Dispatch the command (execution item) to all the nodes within the context.NodeExecutorResultexecuteCommand(ExecutionContext context, ExecArgList command, INodeEntry node)Execute a command within the context on the node.NodeExecutorResultexecuteCommand(ExecutionContext context, ExecArgList command, java.io.InputStream inputStream, INodeEntry node)Execute a command within the context on the node.NodeExecutorResultexecuteCommand(ExecutionContext context, java.lang.String[] command, INodeEntry node)Execute a command within the context on the node.NodeStepResultexecuteNodeStep(StepExecutionContext context, NodeStepExecutionItem item, INodeEntry node)Interpret the execution item within the context for the given node.StepExecutionResultexecuteStep(StepExecutionContext context, StepExecutionItem item)Execute a workflow step item for the given context and return the result.java.lang.StringfileCopyFile(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.StringfileCopyFileStream(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.StringfileCopyScriptContent(ExecutionContext context, java.lang.String script, INodeEntry node, java.lang.String destinationPath)Copy string as a file to the node to a specific pathjava.lang.StringgetName()protected WorkflowExecutionListenergetWorkflowListener(ExecutionContext executionContext)
-
-
-
Method Detail
-
getWorkflowListener
protected WorkflowExecutionListener getWorkflowListener(ExecutionContext executionContext)
-
executeStep
public StepExecutionResult executeStep(StepExecutionContext context, StepExecutionItem item) throws StepException
Description copied from interface:ExecutionServiceExecute a workflow step item for the given context and return the result.- Specified by:
executeStepin interfaceExecutionService- Parameters:
context- contextitem- item- Returns:
- not-null result
- Throws:
StepException- on error
-
executeNodeStep
public NodeStepResult executeNodeStep(StepExecutionContext context, NodeStepExecutionItem item, INodeEntry node) throws NodeStepException
Description copied from interface:ExecutionServiceInterpret the execution item within the context for the given node.- Specified by:
executeNodeStepin interfaceExecutionService- Parameters:
context- contextitem- step itemnode- node- Returns:
- result
- Throws:
NodeStepException- on error
-
dispatchToNodes
public DispatcherResult dispatchToNodes(StepExecutionContext context, NodeStepExecutionItem item) throws DispatcherException, ExecutionServiceException
Description copied from interface:ExecutionServiceDispatch the command (execution item) to all the nodes within the context.- Specified by:
dispatchToNodesin interfaceExecutionService- Parameters:
context- contextitem- step item- Returns:
- result
- Throws:
DispatcherException- on dispatch errorExecutionServiceException- on service error
-
dispatchToNodes
public DispatcherResult dispatchToNodes(StepExecutionContext context, Dispatchable item) throws DispatcherException, ExecutionServiceException
Description copied from interface:ExecutionServiceDispatch the command (execution item) to all the nodes within the context.- Specified by:
dispatchToNodesin interfaceExecutionService- Parameters:
context- contextitem- step item- Returns:
- result
- Throws:
DispatcherException- on dispatch errorExecutionServiceException- on service error
-
fileCopyFileStream
public java.lang.String fileCopyFileStream(ExecutionContext context, java.io.InputStream input, INodeEntry node, java.lang.String destinationPath) throws FileCopierException
Description copied from interface:ExecutionServiceCopy inputstream as a file to the node to a specific path- Specified by:
fileCopyFileStreamin interfaceExecutionService- Specified by:
fileCopyFileStreamin interfaceNodeExecutionService- Parameters:
context- contextinput- input streamnode- nodedestinationPath- destination path- Returns:
- filepath on the node for the destination file.
- Throws:
FileCopierException- on error
-
fileCopyFile
public java.lang.String fileCopyFile(ExecutionContext context, java.io.File file, INodeEntry node, java.lang.String destinationPath) throws FileCopierException
Description copied from interface:ExecutionServiceCopy file to the node to a specific path- Specified by:
fileCopyFilein interfaceExecutionService- Specified by:
fileCopyFilein interfaceNodeExecutionService- Parameters:
context- contextfile- input filenode- nodedestinationPath- destination path- Returns:
- filepath
- Throws:
FileCopierException- on error
-
fileCopyFiles
public 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
Description copied from interface:ExecutionServiceCopy multiple files to the node to a specific path- Specified by:
fileCopyFilesin interfaceExecutionService- 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
public java.lang.String fileCopyScriptContent(ExecutionContext context, java.lang.String script, INodeEntry node, java.lang.String destinationPath) throws FileCopierException
Description copied from interface:ExecutionServiceCopy string as a file to the node to a specific path- Specified by:
fileCopyScriptContentin interfaceExecutionService- Parameters:
context- contextscript- script stringnode- nodedestinationPath- destination path- Returns:
- filepath for the copied file on the node
- Throws:
FileCopierException- on error
-
executeCommand
public NodeExecutorResult executeCommand(ExecutionContext context, java.lang.String[] command, INodeEntry node)
Description copied from interface:ExecutionServiceExecute a command within the context on the node.- Specified by:
executeCommandin interfaceExecutionService- Parameters:
context- contextcommand- command stringsnode- node- Returns:
- result
-
executeCommand
public NodeExecutorResult executeCommand(ExecutionContext context, ExecArgList command, INodeEntry node)
Description copied from interface:ExecutionServiceExecute a command within the context on the node.- Specified by:
executeCommandin interfaceExecutionService- Specified by:
executeCommandin interfaceNodeExecutionService- Parameters:
context- contextcommand- commandnode- node- Returns:
- result
-
executeCommand
public NodeExecutorResult executeCommand(ExecutionContext context, ExecArgList command, java.io.InputStream inputStream, INodeEntry node)
Description copied from interface:ExecutionServiceExecute a command within the context on the node.- Specified by:
executeCommandin interfaceExecutionService- Parameters:
context- contextcommand- commandinputStream- input to the processnode- node- Returns:
- result
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfaceFrameworkSupportService- Returns:
- the name used to identify the service
-
-