Interface CommandBuilder
-
- All Known Implementing Classes:
DefaultCommandBuilder
public interface CommandBuilder
Interface for building a process.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.apache.commons.exec.Executor
configure(org.apache.commons.exec.Executor exec)
Configure theExecutor
.org.apache.commons.exec.CommandLine
createCommandLine(AdaptrisMessage msg)
Build aProcessBuilder
object from the available data.java.util.Map<java.lang.String,java.lang.String>
createEnvironment(AdaptrisMessage msg)
Create the environment when executing the process.
-
-
-
Method Detail
-
createCommandLine
org.apache.commons.exec.CommandLine createCommandLine(AdaptrisMessage msg) throws CoreException
Build aProcessBuilder
object from the available data.- Parameters:
msg
- the AdaptrisMessage- Returns:
- a
ProcessBuilder
- Throws:
CoreException
- wrapping any other exception.
-
configure
org.apache.commons.exec.Executor configure(org.apache.commons.exec.Executor exec) throws CoreException
Configure theExecutor
.- Parameters:
exec
- the Executor to configure.- Returns:
- the same executor.
- Throws:
CoreException
- wrapping other exceptions.
-
createEnvironment
java.util.Map<java.lang.String,java.lang.String> createEnvironment(AdaptrisMessage msg) throws CoreException
Create the environment when executing the process.- Parameters:
msg
- the message.- Returns:
- the environment for
Executor.execute(CommandLine, Map)
. If null, then the default environment is used. - Throws:
CoreException
- wrapping other exceptions
-
-