org.rhq.enterprise.client
Class ClientMain
java.lang.Object
org.rhq.enterprise.client.ClientMain
public class ClientMain
- extends Object
- Author:
- Greg Hinkle, Simeon Pinder
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_CONSOLE_WIDTH
public static final int DEFAULT_CONSOLE_WIDTH
- See Also:
- Constant Field Values
ClientMain
public ClientMain()
main
public static void main(String[] args)
throws Exception
- Throws:
Exception
getUserInput
public String getUserInput(String prompt)
getConsoleReader
public jline.ConsoleReader getConsoleReader()
loggedIn
public boolean loggedIn()
- Indicates whether the 'Subject', used for all authenticated actions, is currently logged in.
- Returns:
- flag indicating status of realtime check.
executePromptCommand
public boolean executePromptCommand(String[] args)
throws Exception
- Throws:
Exception
parseCommandLine
public String[] parseCommandLine(String cmdLine)
- Given a command line, this will parse each argument and return the argument array.
- Parameters:
cmdLine - the command line
- Returns:
- the array of command line arguments
getRemoteClient
public RemoteClient getRemoteClient()
setRemoteClient
public void setRemoteClient(RemoteClient remoteClient)
getSubject
public org.rhq.core.domain.auth.Subject getSubject()
setSubject
public void setSubject(org.rhq.core.domain.auth.Subject subject)
getTransport
public String getTransport()
setTransport
public void setTransport(String transport)
getHost
public String getHost()
setHost
public void setHost(String host)
getPort
public int getPort()
setPort
public void setPort(int port)
getUser
public String getUser()
setUser
public void setUser(String user)
getPass
public String getPass()
setPass
public void setPass(String pass)
getPrintWriter
public PrintWriter getPrintWriter()
setPrintWriter
public void setPrintWriter(PrintWriter writer)
getConsoleWidth
public int getConsoleWidth()
getCommands
public Map<String,ClientCommand> getCommands()
addMenuNote
public void addMenuNote(String note)
- This method allows ClientCommands to insert a small note to be displayed after the command has been executed. A
note can be an indication of a problem that was handled or a note about some option that should be changed.
These notes are meant to be terse, and pasted/purged at the end of every command execution.
- Parameters:
note - the note to be displayed, e.g. "There were errors retrieving some data from the server objects. See
System Admin."
isInteractiveMode
public boolean isInteractiveMode()
getRecorder
public Recorder getRecorder()
setRecorder
public void setRecorder(Recorder recorder)
Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.