
public class ProcessExecutor extends Object
| Constructor and Description |
|---|
ProcessExecutor() |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
execute(Map<String,String> input,
String... command) |
List<String> |
execute(String... command) |
ProcessExecutor |
removeShutdownHook(Process p) |
Boolean |
scheduleUntilTrue(Callable<Boolean> callable,
long timeout,
long step,
TimeUnit unit)
Schedules a callable to be executed in regular intervals
|
Process |
spawn(List<String> command)
Spawns a process defined by command.
|
Process |
spawn(String... command)
Spawns a process defined by command.
|
<T> Future<T> |
submit(Callable<T> callable)
Submit callable to be executed
|
public <T> Future<T> submit(Callable<T> callable)
callable - to be executedpublic Boolean scheduleUntilTrue(Callable<Boolean> callable, long timeout, long step, TimeUnit unit) throws InterruptedException, ExecutionException
callable - Callabletimeout - Total timeoutstep - delay before next executionunit - time unittrue if executed successfully, false otherwiseInterruptedExceptionExecutionExceptionpublic Process spawn(List<String> command) throws InterruptedException, ExecutionException
command - InterruptedExceptionExecutionExceptionpublic Process spawn(String... command) throws InterruptedException, ExecutionException
command - the command to be executedInterruptedExceptionExecutionExceptionpublic List<String> execute(Map<String,String> input, String... command) throws InterruptedException, ExecutionException
input - command - InterruptedExceptionExecutionExceptionpublic List<String> execute(String... command) throws InterruptedException, ExecutionException
command - InterruptedExceptionExecutionExceptionpublic ProcessExecutor removeShutdownHook(Process p)
Copyright © 2013 JBoss by Red Hat. All Rights Reserved.