com.github.dakusui.cmd
Class CommandRunner
java.lang.Object
com.github.dakusui.cmd.CommandRunner
public class CommandRunner
- extends Object
|
Method Summary |
static void |
addListener(CommandListener l)
|
static CommandListener |
getListener(int i)
|
static int |
numListeners()
|
static void |
removeAllListeners()
|
static void |
removeListener(int i)
|
static CommandResult |
run(int timeout,
String[] execShell,
String[] stopShell,
String command,
String[]... stdins)
|
static CommandResult |
runLocal(int timeout,
String command,
String[]... stdins)
|
static CommandResult |
runLocal(String command,
String[]... stdins)
|
static CommandResult |
runRemote(int timeout,
String userName,
String hostName,
String privKeyFile,
String command,
String[]... stdins)
|
static CommandResult |
runRemote(String userName,
String hostName,
String privKeyFile,
String command,
String[]... stdins)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
run
public static CommandResult run(int timeout,
String[] execShell,
String[] stopShell,
String command,
String[]... stdins)
throws InterruptedException,
ExecutionException,
TimeoutException,
IOException
- Throws:
InterruptedException
ExecutionException
TimeoutException
IOException
runLocal
public static CommandResult runLocal(int timeout,
String command,
String[]... stdins)
throws InterruptedException,
ExecutionException,
TimeoutException,
IOException
- Throws:
InterruptedException
ExecutionException
TimeoutException
IOException
runLocal
public static CommandResult runLocal(String command,
String[]... stdins)
throws InterruptedException,
ExecutionException,
TimeoutException,
IOException
- Throws:
InterruptedException
ExecutionException
TimeoutException
IOException
runRemote
public static CommandResult runRemote(String userName,
String hostName,
String privKeyFile,
String command,
String[]... stdins)
throws InterruptedException,
ExecutionException,
TimeoutException,
IOException
- Throws:
InterruptedException
ExecutionException
TimeoutException
IOException
runRemote
public static CommandResult runRemote(int timeout,
String userName,
String hostName,
String privKeyFile,
String command,
String[]... stdins)
throws InterruptedException,
ExecutionException,
TimeoutException,
IOException
- Throws:
InterruptedException
ExecutionException
TimeoutException
IOException
addListener
public static void addListener(CommandListener l)
removeListener
public static void removeListener(int i)
getListener
public static CommandListener getListener(int i)
numListeners
public static int numListeners()
removeAllListeners
public static void removeAllListeners()
Copyright © 2013. All Rights Reserved.