com.sun.enterprise.admin.cli.cluster
Class StopLocalInstanceCommand
java.lang.Object
com.sun.enterprise.admin.cli.CLICommand
com.sun.enterprise.admin.cli.LocalServerCommand
com.sun.enterprise.admin.cli.cluster.LocalInstanceCommand
com.sun.enterprise.admin.cli.cluster.StopLocalInstanceCommand
- All Implemented Interfaces:
- org.jvnet.hk2.component.PostConstruct
- Direct Known Subclasses:
- RestartLocalInstanceCommand
@Service(name="stop-local-instance")
@Scoped(value=org.jvnet.hk2.component.PerLookup.class)
public class StopLocalInstanceCommand
- extends LocalInstanceCommand
Stop a local server instance.
- Author:
- Bill Shannon, Byron Nevins
| Fields inherited from class com.sun.enterprise.admin.cli.CLICommand |
argv, commandModel, CONNECTION_ERROR, env, ERROR, INVALID_COMMAND_ERROR, logger, metadataErrors, name, operands, options, passwords, programOpts, SUCCESS, WARNING |
|
Method Summary |
protected int |
doRemoteCommand()
Execute the actual stop-domain command. |
protected int |
executeCommand()
|
protected void |
initInstance()
Big trouble if you allow the super implementation to run
because it creates directories. |
protected int |
instanceNotRunning()
Print message and return exit code when
we detect that the DAS is not running. |
protected boolean |
mkdirs(java.io.File f)
Override this method if your class does NOT want to create directories |
protected void |
validate()
|
| Methods inherited from class com.sun.enterprise.admin.cli.cluster.LocalInstanceCommand |
getDasProperties, getInstallRootPath, getInstanceDirs, getMasterPasswordFile, getNodeInstallDir, getProductRootPath, isDirectory, setDasDefaults, setServerDirs, validateDasOptions, whackFilesystem |
| Methods inherited from class com.sun.enterprise.admin.cli.LocalServerCommand |
checkForSpecialFiles, getAdminAddress, getAdminAddress, getDomainXml, getMasterPassword, getPrevPid, getServerDirs, getUptime, isRestartable, isRunning, isRunning, isRunning, isThisServer, loadAndVerifyKeystore, readFromMasterPasswordFile, resetServerDirs, setLocalPassword, setServerDirs, unsetLocalPassword, verifyMasterPassword, waitForRestart |
| Methods inherited from class com.sun.enterprise.admin.cli.CLICommand |
checkHelp, execute, getBooleanOption, getCommand, getManPage, getName, getOperandModel, getOption, getPassword, getProgramOptions, getSystemProperties, getSystemProperty, getUsage, initializeLogger, initializePasswords, inject, ok, parse, postConstruct, prepare, prevalidate, printExceptionStackTrace, processProgramOptions, quote, readPassword, toString, usageOptions |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
StopLocalInstanceCommand
public StopLocalInstanceCommand()
validate
protected void validate()
throws CommandException,
CommandValidationException
- Overrides:
validate in class LocalInstanceCommand
- Throws:
CommandException
CommandValidationException
mkdirs
protected boolean mkdirs(java.io.File f)
- Description copied from class:
LocalInstanceCommand
- Override this method if your class does NOT want to create directories
- Overrides:
mkdirs in class LocalInstanceCommand
- Parameters:
f - the directory to create
initInstance
protected void initInstance()
throws CommandException
- Big trouble if you allow the super implementation to run
because it creates directories. If this command is called with
an instance that doesn't exist -- new dirs will be created which
can cause other problems.
- Overrides:
initInstance in class LocalInstanceCommand
- Throws:
CommandException
executeCommand
protected int executeCommand()
throws CommandException,
CommandValidationException
- Specified by:
executeCommand in class CLICommand
- Throws:
CommandException
CommandValidationException
instanceNotRunning
protected int instanceNotRunning()
throws CommandException
- Print message and return exit code when
we detect that the DAS is not running.
- Throws:
CommandException
doRemoteCommand
protected int doRemoteCommand()
throws CommandException
- Execute the actual stop-domain command.
- Throws:
CommandException
Copyright © 2012 GlassFish Community. All Rights Reserved.