public abstract class LocalInstanceCommand extends LocalServerCommand
Modifier and Type | Field and Description |
---|---|
protected boolean |
checkOneAndOnly |
protected String |
domainName |
protected File |
instanceDir |
protected String |
instanceName |
protected boolean |
isCreateInstanceFilesystem |
protected String |
node |
protected String |
nodeDir |
protected File |
nodeDirChild |
protected File |
nodeDirRoot |
argv, commandModel, CONNECTION_ERROR, env, ERROR, INVALID_COMMAND_ERROR, logger, metadataErrors, name, operands, options, passwords, programOpts, SUCCESS, WARNING
Constructor and Description |
---|
LocalInstanceCommand() |
Modifier and Type | Method and Description |
---|---|
protected Properties |
getDasProperties(File propfile) |
protected String |
getInstallRootPath()
Gets the GlassFish installation root (using property com.sun.aas.installRoot),
first from asenv.conf.
|
protected InstanceDirs |
getInstanceDirs() |
String |
getInstanceName() |
protected File |
getMasterPasswordFile() |
protected String |
getNodeInstallDir() |
protected String |
getProductRootPath()
Gets the GlassFish product installation root (using property
com.sun.aas.productRoot), first from asenv.conf.
|
protected void |
initInstance() |
protected boolean |
isDirectory(File f)
Override this method if your class does NOT want CommandException thrown
if directory does not exist.
|
protected boolean |
mkdirs(File f)
Override this method if your class does NOT want to create directories
|
protected void |
setDasDefaults(File propfile)
Set the programOpts based on the das.properties file.
|
void |
setInstanceName(String instanceName) |
protected boolean |
setServerDirs()
Override this method if your class does NOT want to set ServerDirs
|
protected void |
validate()
The validate method can be used by a subclass to validate
that the type and quantity of parameters and operands matches
the requirements for this command.
|
protected void |
validateDasOptions(String hostOption,
String portOption,
String isSecureOption,
File propfile)
Checks if programOpts values match das.properties file.
|
protected void |
whackFilesystem() |
checkForSpecialFiles, getAdminAddress, getAdminAddress, getDomainXml, getMasterPassword, getPrevPid, getServerDirs, getServerPid, getUptime, isLocal, isRemote, isRestartable, isRunning, isRunning, isThisServer, loadAndVerifyKeystore, readFromMasterPasswordFile, resetServerDirs, setLocalPassword, setServerDirs, unsetLocalPassword, verifyMasterPassword, waitForRestart
checkHelp, execute, executeCommand, expandManPage, getBooleanOption, getBriefCommandUsage, getCommand, getCommand, getCommandScope, getCommandUsage, getManPage, getName, getOperandModel, getOption, getOptions, getPassword, getPassword, getProgramOptions, getSystemProperties, getSystemProperty, getUsage, initializeLogger, initializePasswords, inject, ok, parse, postConstruct, prepare, prevalidate, printExceptionStackTrace, processProgramOptions, quote, readPassword, setCommandScope, toString, usageOptions
protected String nodeDir
protected String node
protected String instanceName
protected File nodeDirRoot
protected File nodeDirChild
protected File instanceDir
protected String domainName
protected boolean isCreateInstanceFilesystem
protected boolean checkOneAndOnly
protected void validate() throws CommandException, CommandValidationException
CLICommand
validate
in class CLICommand
CommandException
- if execution of the command failsCommandValidationException
- if there's something wrong
with the options or argumentsprotected boolean mkdirs(File f)
f
- the directory to createprotected boolean isDirectory(File f)
f
- directory to checkprotected boolean setServerDirs()
protected void initInstance() throws CommandException
CommandException
protected final InstanceDirs getInstanceDirs()
protected final void setDasDefaults(File propfile) throws CommandException
CommandException
protected final void validateDasOptions(String hostOption, String portOption, String isSecureOption, File propfile) throws CommandException
CommandException
protected final Properties getDasProperties(File propfile) throws CommandException
CommandException
protected final void whackFilesystem() throws CommandException
CommandException
protected String getInstallRootPath() throws CommandException
CommandException
- if the GlassFish install root is not foundprotected String getProductRootPath() throws CommandException
CommandException
- if the GlassFish install root is not foundprotected String getNodeInstallDir() throws CommandException
CommandException
protected File getMasterPasswordFile()
getMasterPasswordFile
in class LocalServerCommand
public String getInstanceName()
public void setInstanceName(String instanceName)
instanceName
- the instanceName to setCopyright © 2018. All rights reserved.