public class Commands extends Object
<commands> <batch>false</batch> <command>/subsystem=logging/console-handler:CONSOLE:write-attribute(name=level,value=TRACE)</command> </commands>
Constructor and Description |
---|
Commands() |
Modifier and Type | Method and Description |
---|---|
static org.jboss.as.cli.CommandContext |
create(org.jboss.as.controller.client.ModelControllerClient client)
Creates the command context and binds the client to the context.
|
void |
execute(org.jboss.as.controller.client.ModelControllerClient client)
Execute the commands.
|
boolean |
hasCommands()
Checks of there are commands that should be executed.
|
boolean |
hasScripts()
Checks of there are a CLI script file that should be executed.
|
boolean |
isBatch()
Indicates whether or not commands should be executed in a batch.
|
public boolean isBatch()
true
if commands should be executed in a batch, otherwise
false
public boolean hasCommands()
true
if there are commands to be processed, otherwise false
public boolean hasScripts()
true
if there are a CLI script to be processed, otherwise
false
public final void execute(org.jboss.as.controller.client.ModelControllerClient client) throws IOException
client
- the client used to execute the commandsIOException
- if the client has an IOExceptionIllegalArgumentException
- if an command is invalidpublic static org.jboss.as.cli.CommandContext create(org.jboss.as.controller.client.ModelControllerClient client)
null
, no client is bound to the context.client
- current connected clientIllegalStateException
- if the context fails to initializeCopyright © 2013 JBoss by Red Hat. All Rights Reserved.