com.sun.enterprise.admin.cli
Class StartDomainCommand

java.lang.Object
  extended by com.sun.enterprise.admin.cli.CLICommand
      extended by com.sun.enterprise.admin.cli.LocalServerCommand
          extended by com.sun.enterprise.admin.cli.LocalDomainCommand
              extended by com.sun.enterprise.admin.cli.StartDomainCommand
All Implemented Interfaces:
StartServerCommand, org.jvnet.hk2.component.PostConstruct

@Service(name="start-domain")
@Scoped(value=org.jvnet.hk2.component.PerLookup.class)
public class StartDomainCommand
extends LocalDomainCommand
implements StartServerCommand

The start-domain command.

Author:
bnevins, Bill Shannon

Field Summary
private  boolean debug
           
private  java.lang.String domainName0
           
private  boolean dry_run
           
private  StartServerHelper helper
           
private  GFLauncherInfo info
           
private  GFLauncher launcher
           
private static java.lang.String newpwName
           
private static LocalStringsImpl strings
           
private  boolean upgrade
           
private  boolean verbose
           
 
Fields inherited from class com.sun.enterprise.admin.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
StartDomainCommand()
           
 
Method Summary
 void createLauncher()
          Create a launcher for the domain specified by arguments to this command.
private  void debug(java.lang.String s)
           
private  void doAdminPasswordCheck()
           
private  void doAutoUpgrade(java.lang.String mpv)
           
protected  int executeCommand()
          Execute the command using the options in options and the operands in operands.
 RuntimeType getType()
           
private  java.lang.String[] respawnArgs()
          Return the asadmin command line arguments necessar to start this domain admin server.
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.
 
Methods inherited from class com.sun.enterprise.admin.cli.LocalDomainCommand
getDomainName, getDomainRootDir, getDomainsDir, initDomain, isThisDAS, prepare, setDomainName
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

info

private GFLauncherInfo info

launcher

private GFLauncher launcher

verbose

private boolean verbose

upgrade

private boolean upgrade

debug

private boolean debug

domainName0

private java.lang.String domainName0

dry_run

private boolean dry_run

strings

private static final LocalStringsImpl strings

helper

private StartServerHelper helper

newpwName

private static final java.lang.String newpwName
See Also:
Constant Field Values
Constructor Detail

StartDomainCommand

public StartDomainCommand()
Method Detail

getType

public RuntimeType getType()
Specified by:
getType in interface StartServerCommand
Returns:
the type of "this" server

validate

protected void validate()
                 throws CommandException,
                        CommandValidationException
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

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

createLauncher

public void createLauncher()
                    throws GFLauncherException,
                           MiniXmlParserException
Create a launcher for the domain specified by arguments to this command. The launcher is for a server of the specified type. Sets the launcher and info fields. It has to be public because it is part of an interface

Specified by:
createLauncher in interface StartServerCommand
Throws:
GFLauncherException
MiniXmlParserException

respawnArgs

private java.lang.String[] respawnArgs()
Return the asadmin command line arguments necessar to start this domain admin server.


debug

private void debug(java.lang.String s)

doAutoUpgrade

private void doAutoUpgrade(java.lang.String mpv)
                    throws GFLauncherException,
                           MiniXmlParserException,
                           CommandException
Throws:
GFLauncherException
MiniXmlParserException
CommandException

doAdminPasswordCheck

private void doAdminPasswordCheck()
                           throws CommandException
Throws:
CommandException


Copyright © 2012 GlassFish Community. All Rights Reserved.