com.sun.enterprise.admin.servermgmt.cli
Class StopDomainCommand

java.lang.Object
  extended by com.sun.enterprise.admin.cli.CLICommand
      extended by com.sun.enterprise.admin.servermgmt.cli.LocalServerCommand
          extended by com.sun.enterprise.admin.servermgmt.cli.LocalDomainCommand
              extended by com.sun.enterprise.admin.servermgmt.cli.StopDomainCommand
All Implemented Interfaces:
org.glassfish.hk2.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

Field Summary
 
Fields inherited from class com.sun.enterprise.admin.servermgmt.cli.LocalDomainCommand
domainDirParam
 
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
 
Constructor Summary
StopDomainCommand()
           
 
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()
           
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.
protected  void validate()
           
protected  void waitForDeath()
          Wait for the server to die.
 
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, 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, getBriefCommandUsage, getCommand, getCommandUsage, getManPage, getName, getOperandModel, getOption, getPassword, getProgramOptions, getSystemProperties, getSystemProperty, getUsage, initializeLogger, initializePasswords, inject, ok, parse, postConstruct, prevalidate, printExceptionStackTrace, processProgramOptions, quote, readPassword, toString, usageOptions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StopDomainCommand

public StopDomainCommand()
Method Detail

validate

protected void validate()
                 throws CommandException
Overrides:
validate in class LocalDomainCommand
Throws:
CommandException

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
Specified by:
executeCommand in class CLICommand
Throws:
CommandException

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


Copyright © 2012. All Rights Reserved.