Class RestartDomainCommand
java.lang.Object
com.sun.enterprise.admin.cli.CLICommand
com.sun.enterprise.admin.servermgmt.cli.LocalServerCommand
com.sun.enterprise.admin.servermgmt.cli.LocalDomainCommand
com.sun.enterprise.admin.servermgmt.cli.StopDomainCommand
com.sun.enterprise.admin.servermgmt.cli.RestartDomainCommand
- All Implemented Interfaces:
org.glassfish.hk2.api.PostConstruct
@Service(name="restart-domain")
@PerLookup
public class RestartDomainCommand
extends StopDomainCommand
THe restart-domain command. The local portion of this command is only used to block until:
- the old server dies
- the new server starts
- Get the uptime for the current server
- start the remote Restart command
- Call uptime in a loop until the uptime number is less than the original uptime
- Author:
- bnevins, Bill Shannon
-
Field Summary
Fields inherited from class com.sun.enterprise.admin.servermgmt.cli.LocalDomainCommand
domainDirParamFields 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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intIf the server isn't running, try to start it.protected voidExecute the restart-domain command.Methods inherited from class com.sun.enterprise.admin.servermgmt.cli.StopDomainCommand
executeCommand, initDomain, validateMethods inherited from class com.sun.enterprise.admin.servermgmt.cli.LocalDomainCommand
getDomainName, getDomainRootDir, getDomainsDir, isThisDAS, prepare, setDomainNameMethods inherited from class com.sun.enterprise.admin.servermgmt.cli.LocalServerCommand
checkForSpecialFiles, getAdminAddress, getAdminAddress, getDomainXml, getMasterPassword, getMasterPasswordFile, getServerDirs, getServerPid, getUptime, isLocal, isRestartable, isThisServer, loadAndVerifyKeystore, readFromMasterPasswordFile, resetServerDirs, setLocalPassword, setServerDirs, unsetLocalPassword, verifyMasterPassword, waitForRestartMethods inherited from class com.sun.enterprise.admin.cli.CLICommand
checkHelp, checkSanity, execute, expandManPage, getBooleanOption, getBriefCommandUsage, getCommand, getCommand, getCommandScope, getCommandUsage, getManPage, getName, getOperandModel, getOption, getOptions, getPassword, getPassword, getProgramOptions, getSystemProperties, getSystemProperty, getUsage, initializeLogger, initializePasswords, inject, ok, parse, postConstruct, prevalidate, processProgramOptions, quote, readPassword, setCommandScope, toString, usageOptions
-
Constructor Details
-
RestartDomainCommand
public RestartDomainCommand()
-
-
Method Details
-
doCommand
protected void doCommand() throws org.glassfish.api.admin.CommandExceptionExecute the restart-domain command.- Overrides:
doCommandin classStopDomainCommand- Throws:
org.glassfish.api.admin.CommandException
-
dasNotRunning
protected int dasNotRunning() throws org.glassfish.api.admin.CommandExceptionIf the server isn't running, try to start it.- Overrides:
dasNotRunningin classStopDomainCommand- Throws:
org.glassfish.api.admin.CommandException
-