public abstract class AbstractMuleCommand extends Object implements MuleCommand
| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
logger |
| Constructor and Description |
|---|
AbstractMuleCommand(MuleServiceWrapper muleServiceWrapper)
Creates an instance of the command.
|
| Modifier and Type | Method and Description |
|---|---|
protected static void |
checkState(boolean condition,
String errorMessage) |
protected org.zeroturnaround.exec.ProcessExecutor |
createMuleProcessExecutor(List<String> command) |
protected org.zeroturnaround.exec.ProcessExecutor |
createMuleProcessExecutor(String command) |
protected org.zeroturnaround.exec.ProcessExecutor |
createMuleProcessExecutor(String command,
String[] args) |
protected abstract void |
doExecute()
Template method for commands.
|
void |
execute()
Executes the command.
|
protected MuleServiceWrapper |
getMuleServiceWrapper() |
public AbstractMuleCommand(MuleServiceWrapper muleServiceWrapper)
muleServiceWrapper - MuleServiceWrapper to execute the command. Non null.protected MuleServiceWrapper getMuleServiceWrapper()
MuleServiceWrapper to allow execution of commands.protected org.zeroturnaround.exec.ProcessExecutor createMuleProcessExecutor(String command)
command - string with the command to be executedProcessExecutor with defaults settings, , timeout and logger.protected org.zeroturnaround.exec.ProcessExecutor createMuleProcessExecutor(String command, String[] args)
command - string with the command to be executedargs - string list containing the argumentsProcessExecutor with defaults settings, , timeout and logger.protected org.zeroturnaround.exec.ProcessExecutor createMuleProcessExecutor(List<String> command)
command - string list containing the program and its argumentsProcessExecutor with defaults settings, , timeout and logger.public final void execute()
execute in interface MuleCommandprotected static void checkState(boolean condition,
String errorMessage)
Copyright © 2023 MuleSoft, Inc.. All rights reserved.