public class CLI extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
CLI.Result
The Result class provides all information about an executed CLI command.
|
| Modifier and Type | Method and Description |
|---|---|
CLI.Result |
cmd(String cliCommand)
Execute a CLI command.
|
void |
connect()
Connect to the server using the default host and port.
|
void |
connect(String username,
char[] password)
Connect to the server using the default host and port.
|
void |
connect(String controllerHost,
int controllerPort,
String username,
char[] password)
Connect to the server using a specified host and port.
|
void |
connect(String controller,
String username,
char[] password)
Connect to the server using a specified host and port.
|
void |
connect(String protocol,
String controllerHost,
int controllerPort,
String username,
char[] password)
Connect to the server using a specified host and port.
|
void |
disconnect()
Disconnect from the server.
|
CommandContext |
getCommandContext()
Return the CLI CommandContext that was created when connected to the server.
|
static CLI |
newInstance()
Create a new CLI instance.
|
public static CLI newInstance()
public CommandContext getCommandContext()
null if not connected.public void connect()
public void connect(String username, char[] password)
username - The user name for logging in.password - The password for logging in.public void connect(String controller, String username, char[] password)
controllerHost - The host name.controllerPort - The port.username - The user name for logging in.password - The password for logging in.public void connect(String controllerHost, int controllerPort, String username, char[] password)
controllerHost - The host name.controllerPort - The port.username - The user name for logging in.password - The password for logging in.public void connect(String protocol, String controllerHost, int controllerPort, String username, char[] password)
protocol - The protocolcontrollerHost - The host name.controllerPort - The port.username - The user name for logging in.password - The password for logging in.public void disconnect()
public CLI.Result cmd(String cliCommand)
cliCommand - A CLI command.Copyright © 2014 JBoss by Red Hat. All rights reserved.