org.rhq.enterprise.client.commands
Interface ClientCommand

All Known Implementing Classes:
HelpCommand, LoginCommand, LogoutCommand, QuitCommand, RecordCommand, ScriptCommand, VersionCommand

public interface ClientCommand

Author:
Greg Hinkle, Simeon Pinder

Field Summary
static Class<ClientCommand>[] COMMANDS
           
 
Method Summary
 boolean execute(ClientMain client, String[] args)
          Executes the agent prompt command with the given arguments.
 String getDetailedHelp()
          Returns a detailed help message to describe to the user what the command's syntax is and any detailed information that is useful to the user that wants to use this command.
 String getHelp()
          Returns a help summary to describe to the user what the prompt command does and its purpose.
 String getPromptCommandString()
          All implementations must indicate what the prompt command is that will trigger its execution.
 String getSyntax()
          Returns a one-line usage string to describe the syntax of the command including all optional and required arguments.
 

Field Detail

COMMANDS

static final Class<ClientCommand>[] COMMANDS
Method Detail

getPromptCommandString

String getPromptCommandString()
All implementations must indicate what the prompt command is that will trigger its execution. This method returns the prompt command name.

Returns:
the prompt command string - if the first prompt argument is this value, then this prompt command will be executed.

execute

boolean execute(ClientMain client,
                String[] args)
Executes the agent prompt command with the given arguments.

Parameters:
client - the ClientMain class itself
args - the arguments passed to the agent on the agent prompt
Returns:
true if the agent can continue accepting prompt commands; false if the agent should die

getSyntax

String getSyntax()
Returns a one-line usage string to describe the syntax of the command including all optional and required arguments.

Returns:
syntax string

getHelp

String getHelp()
Returns a help summary to describe to the user what the prompt command does and its purpose. It is usually a short one line help summary.

Returns:
help string

getDetailedHelp

String getDetailedHelp()
Returns a detailed help message to describe to the user what the command's syntax is and any detailed information that is useful to the user that wants to use this command.

Returns:
detailed help string


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.