public interface ProcessExecutor
| Modifier and Type | Method and Description |
|---|---|
ProcessExecution |
execute(Command command)
Executes a process defined by command.
|
ProcessExecution |
execute(ProcessInteraction interaction,
Command command)
Executes a process defined by command.
|
ProcessExecution |
execute(ProcessInteraction interaction,
String[] command)
Executes a process defined by command.
|
ProcessExecution |
execute(String... command)
Executes a process defined by command.
|
ProcessExecutor |
removeShutdownHook(ProcessExecution p) |
Boolean |
scheduleUntilTrue(Callable<Boolean> callable,
long timeout,
long step,
TimeUnit unit)
Schedules a callable to be executed in regular intervals
|
ProcessExecutor |
setEnvironment(Map<String,String> environment)
Adds given environment map to the default inherited environment be used for next process execution.
|
ProcessExecution |
spawn(Command command)
Spawns a process defined by command.
|
ProcessExecution |
spawn(ProcessInteraction interaction,
Command command)
Spawns a process defined by command.
|
ProcessExecution |
spawn(ProcessInteraction interaction,
String[] command)
Spawns a process defined by command.
|
ProcessExecution |
spawn(String... command)
Spawns a process defined by command.
|
<T> Future<T> |
submit(Callable<T> callable)
Submit callable to be executed
|
ProcessExecutor setEnvironment(Map<String,String> environment) throws IllegalStateException
environment - The new environment settings addonIllegalStateException - In case that environment is null or contains empty values<T> Future<T> submit(Callable<T> callable)
callable - to be executedBoolean scheduleUntilTrue(Callable<Boolean> callable, long timeout, long step, TimeUnit unit) throws ProcessExecutionException
callable - Callabletimeout - Total timeoutstep - delay before next executionunit - time unittrue if executed successfully, false otherwiseProcessExecutionException - if anything goes wrongProcessExecution spawn(ProcessInteraction interaction, String[] command) throws ProcessExecutionException
ProcessInteraction.interaction - command interactioncommand - command to be executedProcessExecutionException - if anything goes wrongProcessExecution spawn(ProcessInteraction interaction, Command command) throws ProcessExecutionException
ProcessInteraction.interaction - command interactioncommand - command to be executedProcessExecutionException - if anything goes wrongProcessExecution spawn(String... command) throws ProcessExecutionException
command - command to be executedProcessExecutionException - if anything goes wrongProcessExecution spawn(Command command) throws ProcessExecutionException
command - command to be executedProcessExecutionException - if anything goes wrongProcessExecution execute(ProcessInteraction interaction, String[] command) throws ProcessExecutionException
ProcessInteraction. Waits for process to
finish and checks if process finished with status code 0interaction - command interactioncommand - command to be executionProcessExecutionException - if anything goes wrongProcessExecution execute(ProcessInteraction interaction, Command command) throws ProcessExecutionException
ProcessInteraction. Waits for process to
finish and checks if process finished with status code 0interaction - command interactioncommand - command to be executedProcessExecutionException - if anything goes wrongProcessExecution execute(String... command) throws ProcessExecutionException
command - command to be executedProcessExecutionException - if anything goes wrongProcessExecution execute(Command command) throws ProcessExecutionException
command - command to be executedProcessExecutionException - if anything goes wrongProcessExecutor removeShutdownHook(ProcessExecution p)
Copyright © 2014 JBoss by Red Hat. All rights reserved.