|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.enterprise.admin.cli.ProgramOptions
public class ProgramOptions
Representation of the options known to the asadmin program. These options control the overall behavior of asadmin, e.g., the server to contact, and aren't specific to any of the commands supported by asadmin.
In GlassFish v3, asadmin program options are normally specified before the asadmin command name, with command options after the command name (although intermixed program and command options are still supported for compatibility).
| Nested Class Summary | |
|---|---|
static class |
ProgramOptions.PasswordLocation
|
| Field Summary | |
|---|---|
static String |
AUTHTOKEN
|
static String |
AUXINPUT
|
static String |
ECHO
|
static String |
HELP
|
static String |
HOST
|
static String |
INTERACTIVE
|
static String |
PASSWORDFILE
|
static String |
PORT
|
static String |
SECURE
|
static String |
TERSE
|
static String |
USER
|
| Constructor Summary | |
|---|---|
ProgramOptions(Environment env)
Initialize program options based only on environment defaults, with no options from the command line. |
|
ProgramOptions(ParameterMap options,
Environment env)
Initialize the programoptions based on parameters parsed from the command line, with defaults supplied by the environment. |
|
ProgramOptions(ProgramOptions other)
Copy constructor. |
|
| Method Summary | |
|---|---|
String |
getAuthToken()
|
String |
getAuxInput()
|
String |
getClassName()
|
String |
getClassPath()
|
String |
getCommandName()
|
String |
getHost()
|
String |
getPassword()
|
String |
getPasswordFile()
|
ProgramOptions.PasswordLocation |
getPasswordLocation()
|
int |
getPort()
|
String[] |
getProgramArguments()
Return an array of asadmin command line options that specify all the options of this ProgramOptions instance. |
String |
getUser()
|
static Collection<CommandModel.ParamModel> |
getValidOptions()
Return a set of all the valid program options. |
boolean |
isEcho()
|
boolean |
isHelp()
|
boolean |
isInteractive()
|
boolean |
isOptionsSet()
|
boolean |
isSecure()
|
boolean |
isTerse()
|
void |
setAuthToken(String token)
|
void |
setAuxInput(String authInput)
|
void |
setClassName(String className)
|
void |
setClassPath(String classPath)
|
void |
setCommandName(String commandName)
|
void |
setEcho(boolean echo)
|
void |
setHelp(boolean help)
|
void |
setHost(String host)
|
void |
setHostAndPort(HostAndPort address)
Convenience method to set the host and port (and secure) attributes from a HostAndPort object. |
void |
setInteractive(boolean interactive)
|
void |
setOptionsSet(boolean optionsSet)
Set whether the program options have already been set. |
void |
setPassword(String password,
ProgramOptions.PasswordLocation location)
|
void |
setPasswordFile(String passwordFile)
|
void |
setPort(int port)
|
void |
setSecure(boolean secure)
|
void |
setTerse(boolean terse)
|
void |
setUser(String user)
|
void |
toEnvironment(Environment env)
Copy the program options that were specified on the command line into the corresponding environment variables. |
String |
toString()
String representation of the asadmin program options. |
void |
updateOptions(ParameterMap newOptions)
Update the program options based on the specified options from the command line. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String HOST
public static final String PORT
public static final String USER
public static final String PASSWORDFILE
public static final String TERSE
public static final String ECHO
public static final String INTERACTIVE
public static final String SECURE
public static final String HELP
public static final String AUTHTOKEN
public static final String AUXINPUT
| Constructor Detail |
|---|
public ProgramOptions(Environment env)
throws CommandException
CommandException
public ProgramOptions(ParameterMap options,
Environment env)
throws CommandException
CommandExceptionpublic ProgramOptions(ProgramOptions other)
| Method Detail |
|---|
public void updateOptions(ParameterMap newOptions)
throws CommandException
CommandExceptionpublic static Collection<CommandModel.ParamModel> getValidOptions()
public void toEnvironment(Environment env)
public String getHost()
public void setHost(String host)
host - the host to setpublic int getPort()
public void setPort(int port)
port - the port to setpublic void setHostAndPort(HostAndPort address)
address - the HostAndPort object from which to set the attributespublic String getUser()
public void setUser(String user)
user - the user to setpublic String getPassword()
public ProgramOptions.PasswordLocation getPasswordLocation()
public void setPassword(String password,
ProgramOptions.PasswordLocation location)
password - the password to setpublic String getPasswordFile()
public void setPasswordFile(String passwordFile)
passwordFile - the passwordFile to setpublic boolean isSecure()
public void setSecure(boolean secure)
secure - the secure to setpublic void setAuthToken(String token)
public String getAuthToken()
public void setAuxInput(String authInput)
public String getAuxInput()
public boolean isTerse()
public void setTerse(boolean terse)
terse - the terse to setpublic boolean isEcho()
public void setEcho(boolean echo)
echo - the echo to setpublic boolean isInteractive()
public void setInteractive(boolean interactive)
interactive - the interactive to setpublic boolean isHelp()
public void setHelp(boolean help)
help - the help to setpublic boolean isOptionsSet()
public void setOptionsSet(boolean optionsSet)
public String[] getProgramArguments()
public String getClassPath()
public void setClassPath(String classPath)
classPath - the classPath to setpublic String getClassName()
public void setClassName(String className)
className - the className to setpublic String getCommandName()
public void setCommandName(String commandName)
commandName - the name of the command (not the subcommand)public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||