JBoss AS7 Deployment Plugin 7.9.Final

org.jboss.as.plugin.cli
Class Commands

java.lang.Object
  extended by org.jboss.as.plugin.cli.Commands

public class Commands
extends Object

CLI commands to run.

      <commands>
          <batch>false</batch>
          <command>/subsystem=logging/console-handler:CONSOLE:write-attribute(name=level,value=TRACE)</command>
      </commands>
 

Author:
James R. Perkins, Heinz Wilming

Constructor Summary
Commands()
           
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Commands

public Commands()
Method Detail

isBatch

public boolean isBatch()
Indicates whether or not commands should be executed in a batch.

Returns:
true if commands should be executed in a batch, otherwise false

hasCommands

public boolean hasCommands()
Checks of there are commands that should be executed.

Returns:
true if there are commands to be processed, otherwise false

hasScripts

public boolean hasScripts()
Checks of there are a CLI script file that should be executed.

Returns:
true if there are a CLI script to be processed, otherwise false

execute

public final void execute(org.jboss.as.controller.client.ModelControllerClient client)
                   throws IOException
Execute the commands.

Note that the client is not closed during this execution.

Parameters:
client - the client used to execute the commands
Throws:
IOException - if the client has an IOException
IllegalArgumentException - if an command is invalid

create

public 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.

If the client is null, no client is bound to the context.

Parameters:
client - current connected client
Returns:
the command line context
Throws:
IllegalStateException - if the context fails to initialize

JBoss AS7 Deployment Plugin 7.9.Final

Copyright © 2016 JBoss by Red Hat. All Rights Reserved.