org.rhq.enterprise.agent.promptcmd
Interface AgentPromptCommand

All Known Implementing Classes:
AvailabilityPromptCommand, ConfigPromptCommand, DebugPromptCommand, DiscoveryPromptCommand, DownloadPromptCommand, DumpSpoolPromptCommand, ExecutePromptCommand, ExitPromptCommand, FailoverPromptCommand, GCPromptCommand, GetConfigPromptCommand, HelpPromptCommand, IdentifyPromptCommand, InventoryPromptCommand, ListDataPromptCommand, LogPromptCommand, MetricsPromptCommand, NativePromptCommand, PingPromptCommand, PiqlPromptCommand, PluginContainerPromptCommand, PluginsPromptCommand, QuitPromptCommand, RegisterPromptCommand, RemoteCommandPromptCommand, SchedulesPromptCommand, SenderPromptCommand, ServerAsyncCommandPromptCommand, ServerCommandPromptCommand, SetConfigPromptCommand, SetupPromptCommand, ShutdownPromptCommand, SleepPromptCommand, StartPromptCommand, TimerPromptCommand, UpdatePromptCommand, VersionPromptCommand

public interface AgentPromptCommand

This is the superclass to all the agent prompt commands - these are simple commands that are executed when the user asks to execute them from the agent prompt. These are different than the remote commands defined by the command framework - prompt commands are local only and can only be executed if the user specifies it from the agent prompt. You can not remotely execute these prompt commands.

Author:
John Mazzitelli

Method Summary
 boolean execute(AgentMain agent, 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.
 

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(AgentMain agent,
                String[] args)
Executes the agent prompt command with the given arguments.

Parameters:
agent - the agent 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-2011 Red Hat, Inc.. All Rights Reserved.