Modifier and Type | Class and Description |
---|---|
protected class |
ControlCommand.UndoTask |
Modifier and Type | Field and Description |
---|---|
protected static String |
AGENT_BASEDIR_NAME |
static String |
AGENT_OPTION |
static String |
HELP_OPTION_1 |
static String |
HELP_OPTION_2 |
protected org.apache.commons.logging.Log |
log |
static String |
RHQ_AGENT_BASEDIR_PROP |
protected static String |
RHQ_AGENT_PIDFILE_DIR_ENV_VARIABLE |
protected static String |
RHQ_SERVER_PIDFILE_DIR_ENV_VARIABLE |
static String |
SERVER_OPTION |
protected static String |
STORAGE_BASEDIR_NAME |
static String |
STORAGE_OPTION |
Constructor and Description |
---|
ControlCommand() |
Modifier and Type | Method and Description |
---|---|
protected void |
addUndoTask(ControlCommand.UndoTask r) |
protected OutputStream |
createNullOutputStream()
Call this method to get an output stream that throws away all data.
|
protected abstract int |
exec(org.apache.commons.cli.CommandLine commandLine) |
int |
exec(String[] args) |
protected File |
getAgentBasedir() |
protected String |
getAgentPid() |
protected File |
getBaseDir() |
protected File |
getBinDir() |
protected org.apache.commons.exec.CommandLine |
getCommandLine(boolean addShExt,
String scriptName,
String... args) |
protected org.apache.commons.exec.CommandLine |
getCommandLine(String scriptName,
String... args) |
abstract String |
getDescription() |
protected File |
getLogDir() |
abstract String |
getName() |
abstract org.apache.commons.cli.Options |
getOptions() |
protected String |
getReadmeContent() |
protected abstract String |
getReadmeFilename()
Subclasses can override this and return a non-null name of its readme file.
|
protected File |
getRhqCtlProperties()
Returns the file of the rhqctl.properties file if it exists.
|
protected String |
getRhqCtlPropertiesPath()
Returns the path to the optional rhqctl.properties file.
|
protected String |
getScript(String scriptName) |
protected File |
getServerInstalledMarkerFile(File baseDir) |
protected String |
getServerPid() |
protected File |
getServerPropertiesFile() |
protected File |
getStorageBasedir() |
protected String |
getStoragePid() |
protected File |
getStoragePidFile() |
protected boolean |
isAgentInstalled() |
protected boolean |
isPortInUse(String host,
int port) |
protected boolean |
isServerInstalled() |
protected boolean |
isServerInstalled(File baseDir) |
protected boolean |
isStorageInstalled() |
protected boolean |
isStorageRunning() |
protected boolean |
isUnixPidRunning(String pid) |
protected boolean |
isWindows() |
protected void |
killPid(String pid) |
void |
printUsage() |
protected void |
setAgentBasedir(File agentBasedir) |
protected List<Integer> |
toIntList(String s) |
protected void |
undo() |
protected void |
waitForProcessToStop(String pid) |
public static final String SERVER_OPTION
public static final String STORAGE_OPTION
public static final String AGENT_OPTION
public static final String HELP_OPTION_1
public static final String HELP_OPTION_2
public static final String RHQ_AGENT_BASEDIR_PROP
protected static final String STORAGE_BASEDIR_NAME
protected static final String AGENT_BASEDIR_NAME
protected static final String RHQ_SERVER_PIDFILE_DIR_ENV_VARIABLE
protected static final String RHQ_AGENT_PIDFILE_DIR_ENV_VARIABLE
protected final org.apache.commons.logging.Log log
protected void undo()
protected void addUndoTask(ControlCommand.UndoTask r)
public abstract String getName()
public abstract String getDescription()
public abstract org.apache.commons.cli.Options getOptions()
protected abstract int exec(org.apache.commons.cli.CommandLine commandLine)
public int exec(String[] args)
public void printUsage()
protected abstract String getReadmeFilename()
protected String getReadmeContent()
protected File getBaseDir()
protected File getBinDir()
protected File getLogDir()
protected File getStorageBasedir()
protected File getAgentBasedir()
protected void setAgentBasedir(File agentBasedir)
protected boolean isServerInstalled()
protected File getServerPropertiesFile()
protected boolean isServerInstalled(File baseDir)
protected boolean isAgentInstalled()
protected boolean isStorageInstalled()
protected File getStoragePidFile()
protected String getStoragePid() throws IOException
IOException
protected String getServerPid() throws IOException
IOException
protected String getAgentPid() throws IOException
IOException
protected File getRhqCtlProperties()
protected String getRhqCtlPropertiesPath()
protected org.apache.commons.exec.CommandLine getCommandLine(String scriptName, String... args)
protected org.apache.commons.exec.CommandLine getCommandLine(boolean addShExt, String scriptName, String... args)
protected boolean isWindows()
protected boolean isPortInUse(String host, int port)
protected void waitForProcessToStop(String pid) throws Exception
Exception
protected void killPid(String pid) throws IOException
IOException
protected boolean isUnixPidRunning(String pid)
protected boolean isStorageRunning() throws IOException
IOException
protected OutputStream createNullOutputStream()
Copyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.