com.sun.enterprise.admin.cli
Class StopDomainCommand
java.lang.Object
com.sun.enterprise.admin.cli.CLICommand
com.sun.enterprise.admin.cli.LocalServerCommand
com.sun.enterprise.admin.cli.LocalDomainCommand
com.sun.enterprise.admin.cli.StopDomainCommand
- All Implemented Interfaces:
- org.jvnet.hk2.component.PostConstruct
- Direct Known Subclasses:
- RestartDomainCommand
@Service(name="stop-domain")
@Scoped(value=org.jvnet.hk2.component.PerLookup.class)
public class StopDomainCommand
- extends LocalDomainCommand
The stop-domain command.
- Author:
- Byron Nevins, Bill Shannon
| 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 |
dasNotRunning(boolean local)
Print message and return exit code when
we detect that the DAS is not running. |
protected void |
doCommand()
Execute the actual stop-domain command. |
protected int |
executeCommand()
Execute the command using the options in options and the
operands in operands. |
protected void |
initDomain()
Override initDomain in LocalDomainCommand to only initialize
the local domain information (name, directory) in the local
case, when no --host has been specified. |
private int |
kill()
|
private boolean |
timedOut(long startTime)
|
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 |
waitForDeath()
Wait for the server to die. |
| Methods inherited from class com.sun.enterprise.admin.cli.LocalServerCommand |
checkForSpecialFiles, getAdminAddress, getAdminAddress, getDomainXml, getMasterPassword, getMasterPasswordFile, 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, prevalidate, printExceptionStackTrace, processProgramOptions, quote, readPassword, toString, usageOptions |
userArgDomainName
private String userArgDomainName
force
Boolean force
kill
Boolean kill
local
private boolean local
WAIT_FOR_DAS_TIME_MS
private static final long WAIT_FOR_DAS_TIME_MS
- See Also:
- Constant Field Values
StopDomainCommand
public StopDomainCommand()
validate
protected void validate()
throws CommandException
- Description copied from class:
CLICommand
- 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.
- Overrides:
validate in class LocalDomainCommand
- Throws:
CommandException - if execution of the command fails
CommandValidationException - if there's something wrong
with the options or arguments
initDomain
protected void initDomain()
throws CommandException
- Override initDomain in LocalDomainCommand to only initialize
the local domain information (name, directory) in the local
case, when no --host has been specified.
- Overrides:
initDomain in class LocalDomainCommand
- Throws:
CommandException
executeCommand
protected int executeCommand()
throws CommandException
- Description copied from class:
CLICommand
- Execute the command using the options in options and the
operands in operands.
- Specified by:
executeCommand in class CLICommand
- Returns:
- the exit code
- Throws:
CommandException - if execution of the command fails
CommandValidationException - if there's something wrong
with the options or arguments
dasNotRunning
protected int dasNotRunning(boolean local)
throws CommandException
- Print message and return exit code when
we detect that the DAS is not running.
- Throws:
CommandException
doCommand
protected void doCommand()
throws CommandException
- Execute the actual stop-domain command.
- Throws:
CommandException
waitForDeath
protected void waitForDeath()
throws CommandException
- Wait for the server to die.
- Throws:
CommandException
timedOut
private boolean timedOut(long startTime)
kill
private int kill()
throws CommandException
- Throws:
CommandException
Copyright © 2012 GlassFish Community. All Rights Reserved.