com.sun.enterprise.admin.launcher
Class GFLauncherInfo

java.lang.Object
  extended by com.sun.enterprise.admin.launcher.GFLauncherInfo

public class GFLauncherInfo
extends Object

Author:
Byron Nevins

Method Summary
 void addArgs(String... args)
          Add the string arguments in the order given.
 void addSecurityToken(String name, String value)
          Adds the given name value pair as a security token.
 List<HostAndPort> getAdminAddresses()
           
 Map<String,String> getArgs()
           
 List<String> getArgsAsList()
           
 String[] getArgsAsStringArray()
          TEMPORARY.
 File getConfigDir()
           
 File getConfigFile()
           
 String getDomainName()
           
 File getDomainRootDir()
           
 String getInstanceName()
           
 File getInstanceRootDir()
           
 RuntimeType getType()
           
 boolean isDebug()
           
 boolean isDomain()
           
 boolean isInstance()
           
 boolean isUpgrade()
           
 boolean isVerbose()
           
 boolean isWatchdog()
           
 void setDebug(boolean b)
          Starts the server in debug mode
 void setDomainName(String domainName)
          Set the (optional) domain name.
 void setDomainParentDir(String domainParentName)
          Set the (optional) domain parent directory.
 void setDomainRootDir(File f)
           
 void setInstanceName(String name)
           
 void setInstanceRootDir(File f)
           
 void setRespawnInfo(String classname, String classpath, String[] args)
           
 void setUpgrade(boolean b)
          Starts the server in upgrade mode
 void setVerbose(boolean b)
          Starts the server in verbose mode
 void setWatchdog(boolean b)
          Starts the server in watchdog mode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addArgs

public void addArgs(String... args)
Add the string arguments in the order given.

Parameters:
args - The string arguments

setDomainName

public void setDomainName(String domainName)
Set the (optional) domain name. This can also be sent in as a String arg like so: "-domainname" "theName"

Parameters:
domainName -

setDomainParentDir

public void setDomainParentDir(String domainParentName)
Set the (optional) domain parent directory. This can also be sent in as a String arg like so: "-domaindir" "parentDirPath"

Parameters:
domainParentName - The parent directory of the domain

setVerbose

public void setVerbose(boolean b)
Starts the server in verbose mode

Parameters:
b -

setWatchdog

public void setWatchdog(boolean b)
Starts the server in watchdog mode. This is only useful if verbose is false. It does the same thing as verbose -- except without the dumping of output to standard out and err streams.

Parameters:
b -
Since:
3.2

setDebug

public void setDebug(boolean b)
Starts the server in debug mode

Parameters:
b -

setUpgrade

public void setUpgrade(boolean b)
Starts the server in upgrade mode

Parameters:
b -

setDomainRootDir

public void setDomainRootDir(File f)

setInstanceName

public void setInstanceName(String name)

setInstanceRootDir

public void setInstanceRootDir(File f)

isDomain

public final boolean isDomain()

isInstance

public final boolean isInstance()

isVerbose

public boolean isVerbose()
Returns:
true if verbose mode is on.

isWatchdog

public boolean isWatchdog()
Returns:
true if watchdog mode is on.

isDebug

public boolean isDebug()
Returns:
true if debug mode is on.

isUpgrade

public boolean isUpgrade()
Returns:
true if upgrade mode is on.

getDomainName

public String getDomainName()
Returns:
The domain name

getConfigFile

public File getConfigFile()

getDomainRootDir

public File getDomainRootDir()

getInstanceName

public String getInstanceName()

getAdminAddresses

public List<HostAndPort> getAdminAddresses()

getType

public RuntimeType getType()

getConfigDir

public File getConfigDir()

getInstanceRootDir

public File getInstanceRootDir()
                        throws GFLauncherException
Throws:
GFLauncherException

getArgsAsStringArray

public String[] getArgsAsStringArray()
                              throws GFLauncherException
TEMPORARY. The guts of HK2 and V3 bootstrapping wants String[] -- this will be changed soon, but it is messy to change it right now. so temporarily we will humor HK2 by sending in String[]

Returns:
an array of String arguments
Throws:
GFLauncherException

getArgsAsList

public List<String> getArgsAsList()
                           throws GFLauncherException
Throws:
GFLauncherException

getArgs

public Map<String,String> getArgs()
                           throws GFLauncherException
Returns:
a Map of processed and packaged args
Throws:
GFLauncherException

setRespawnInfo

public void setRespawnInfo(String classname,
                           String classpath,
                           String[] args)

addSecurityToken

public void addSecurityToken(String name,
                             String value)
Adds the given name value pair as a security token. This is what will be put on the launched process's stdin to securely pass it on. The value is accepted as a String and it may be insecure. A string formed by concatenating name, '=' and value is written to the stdin as a single line delimited by newline character. To get the value of the token, the server should parse the line knowing this. None of the parameters may be null.

Parameters:
name - String representing name of the token
value - String representing the value (should we call it a password?)
Throws:
NullPointerException - if any of the parameters are null


Copyright © 2012. All Rights Reserved.