Class GFLauncherInfo
- java.lang.Object
-
- com.sun.enterprise.admin.launcher.GFLauncherInfo
-
public class GFLauncherInfo extends Object
- Author:
- Byron Nevins
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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()
File
getPostbootCommandsFile()
Returns the file that contains the commands to be executed postbootFile
getPrebootCommandsFile()
RuntimeType
getType()
boolean
isDebug()
boolean
isDomain()
boolean
isDropInterruptedCommands()
boolean
isInstance()
boolean
isUpgrade()
boolean
isVerbose()
boolean
isWatchdog()
void
setDebug(boolean b)
Starts the server in debug modevoid
setDomainName(String domainName)
Set the (optional) domain name.void
setDomainParentDir(String domainParentName)
Set the (optional) domain parent directory.void
setDomainRootDir(File f)
void
setDropInterruptedCommands(boolean dropInterruptedCommands)
void
setInstanceName(String name)
void
setInstanceRootDir(File f)
void
setpostbootCommandsFile(File file)
Sets the file containing commands to be run postboot.void
setpostbootCommandsFile(String file)
Sets the file containing commands to be run postboot.void
setPrebootCommandsFile(String file)
Sets the file containing commands to be run preboot.void
setRespawnInfo(String classname, String classpath, String[] args)
void
setUpgrade(boolean b)
Starts the server in upgrade modevoid
setVerbose(boolean b)
Starts the server in verbose modevoid
setWatchdog(boolean b)
Starts the server in watchdog mode.
-
-
-
Method Detail
-
addArgs
public void addArgs(String... args)
Add the string arguments in the order given.- Parameters:
args
- The string arguments
-
setPrebootCommandsFile
public void setPrebootCommandsFile(String file)
Sets the file containing commands to be run preboot.- Parameters:
file
-
-
setpostbootCommandsFile
public void setpostbootCommandsFile(File file)
Sets the file containing commands to be run postboot.- Parameters:
file
-
-
setpostbootCommandsFile
public void setpostbootCommandsFile(String file)
Sets the file containing commands to be run postboot.- Parameters:
file
-
-
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)
-
setDropInterruptedCommands
public void setDropInterruptedCommands(boolean dropInterruptedCommands)
-
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
-
getPrebootCommandsFile
public File getPrebootCommandsFile()
- Returns:
- The file that contains the commands to be run preboot
-
getPostbootCommandsFile
public File getPostbootCommandsFile()
Returns the file that contains the commands to be executed postboot- Returns:
-
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
-
isDropInterruptedCommands
public boolean isDropInterruptedCommands()
-
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
-
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 tokenvalue
- String representing the value (should we call it a password?)- Throws:
NullPointerException
- if any of the parameters are null
-
-