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
domainDirParam
-
-
Constructor Summary
Constructors Constructor Description RestartDomainCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intdasNotRunning()If the server isn't running, try to start it.protected voiddoCommand()Execute the restart-domain command.-
Methods inherited from class com.sun.enterprise.admin.servermgmt.cli.StopDomainCommand
executeCommand, initDomain, validate, waitForDeath
-
Methods inherited from class com.sun.enterprise.admin.servermgmt.cli.LocalDomainCommand
getDomainName, getDomainRootDir, getDomainsDir, isThisDAS, prepare, setDomainName
-
Methods inherited from class com.sun.enterprise.admin.servermgmt.cli.LocalServerCommand
checkForSpecialFiles, getAdminAddress, getAdminAddress, getDomainXml, getMasterPassword, getMasterPasswordFile, getPrevPid, getServerDirs, getServerPid, getUptime, isLocal, isRemote, isRestartable, isRunning, isRunning, isThisServer, loadAndVerifyKeystore, readFromMasterPasswordFile, resetServerDirs, setLocalPassword, setServerDirs, unsetLocalPassword, verifyMasterPassword, waitForRestart
-
Methods inherited from class com.sun.enterprise.admin.cli.CLICommand
checkHelp, 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, printExceptionStackTrace, processProgramOptions, quote, readPassword, setCommandScope, toString, usageOptions
-
-
-
-
Method Detail
-
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
-
-