com.github.dakusui.cmd
Enum CommandUtils
java.lang.Object
java.lang.Enum<CommandUtils>
com.github.dakusui.cmd.CommandUtils
- All Implemented Interfaces:
- Serializable, Comparable<CommandUtils>
public enum CommandUtils
- extends Enum<CommandUtils>
|
Method Summary |
static CommandResult |
run(int timeout,
String[] execShell,
String command)
|
static CommandResult |
runLocal(int timeout,
String command)
|
static CommandResult |
runLocal(String command)
|
static CommandResult |
runRemote(int timeout,
String userName,
String hostName,
String privKeyFile,
String command)
|
static CommandResult |
runRemote(String userName,
String hostName,
String privKeyFile,
String command)
|
static CommandUtils |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static CommandUtils[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared. |
values
public static CommandUtils[] values()
- Returns an array containing the constants of this enum type, in
the order they are declared. This method may be used to iterate
over the constants as follows:
for (CommandUtils c : CommandUtils.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static CommandUtils valueOf(String name)
- Returns the enum constant of this type with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this type. (Extraneous whitespace characters are
not permitted.)
- Parameters:
name - the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is null
run
public static CommandResult run(int timeout,
String[] execShell,
String command)
throws CommandException
- Throws:
CommandException
runLocal
public static CommandResult runLocal(int timeout,
String command)
throws CommandException
- Throws:
CommandException
runLocal
public static CommandResult runLocal(String command)
throws CommandException
- Throws:
CommandException
runRemote
public static CommandResult runRemote(String userName,
String hostName,
String privKeyFile,
String command)
throws CommandException
- Throws:
CommandException
runRemote
public static CommandResult runRemote(int timeout,
String userName,
String hostName,
String privKeyFile,
String command)
throws CommandException
- Throws:
CommandException
Copyright © 2016. All rights reserved.