public class CommandLine extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CMD |
static String |
CONFIG |
static String |
CONFIG_FILE |
static String |
DAEMON |
static String |
DEV_MODE
Command line option to enable "dev mode".
|
static String |
DIR |
static String |
EXPERIMENTALDB |
static String |
HELP |
static String |
HELP2 |
static String |
HOST |
static String |
INSTALL_DIR |
static String |
LOWMEM |
static String |
NEW_SESSION |
static String |
NOSTDOUT
Command line option to disable the default logging through standard output.
|
static String |
PORT |
static String |
SESSION |
static String |
SILENT |
static String |
SUPPORT_INFO |
static String |
VERSION |
Constructor and Description |
---|
CommandLine(String[] args) |
Modifier and Type | Method and Description |
---|---|
static void |
error(String str)
A method for reporting error messages in
CommandLineListener.execute(CommandLineArgument[]) implementations. |
static void |
error(String str,
Throwable e)
A method for reporting error messages in
CommandLineListener.execute(CommandLineArgument[]) implementations. |
String |
getArgument(String keyword) |
Hashtable<String,String> |
getConfigs()
Deprecated.
(2.6.0) Use
getOrderedConfigs() instead, which are in the order they
were specified. |
String |
getHelp() |
static String |
getHelp(List<CommandLineArgument[]> cmdList) |
String |
getHost() |
Map<String,String> |
getOrderedConfigs()
Gets the
config command line arguments, in the order they were specified. |
int |
getPort() |
static void |
info(String str)
A method for reporting informational messages in
CommandLineListener.execute(CommandLineArgument[]) implementations. |
boolean |
isDaemon() |
boolean |
isDevMode()
Tells whether or not the "dev mode" should be enabled.
|
boolean |
isDisplaySupportInfo() |
boolean |
isEnabled(String keyword) |
boolean |
isExperimentalDb() |
boolean |
isGUI()
Tells whether or not ZAP was started with GUI.
|
boolean |
isLowMem() |
boolean |
isNoStdOutLog()
Tells whether or not the default logging through standard output should be disabled.
|
boolean |
isReportVersion() |
boolean |
isSilent()
Returns true if ZAP should not make any unsolicited requests, e.g.
|
void |
parse(List<CommandLineArgument[]> commandList,
Map<String,CommandLineListener> extMap) |
void |
setDaemon(boolean daemon) |
void |
setExperimentalDb(boolean experimentalDb) |
void |
setGUI(boolean GUI)
Sets whether or not ZAP was started with GUI.
|
void |
setLowMem(boolean lowMem) |
public static final String SESSION
public static final String NEW_SESSION
public static final String DAEMON
public static final String HELP
public static final String HELP2
public static final String DIR
public static final String VERSION
public static final String PORT
public static final String HOST
public static final String CMD
public static final String INSTALL_DIR
public static final String CONFIG
public static final String CONFIG_FILE
public static final String LOWMEM
public static final String EXPERIMENTALDB
public static final String SUPPORT_INFO
public static final String SILENT
public static final String NOSTDOUT
isNoStdOutLog()
,
Constant Field Valuespublic static final String DEV_MODE
With this option development related utilities/functionalities are enabled. For example, it's shown an error counter in the footer tool bar and license is implicitly accepted (thus not requiring to show/accept the license each time a new home is used).
Note: this mode is always enabled when running ZAP directly from source (i.e. not packaged in a JAR) or using a dev build.
isDevMode()
,
Constant Field Valuespublic void parse(List<CommandLineArgument[]> commandList, Map<String,CommandLineListener> extMap) throws Exception
Exception
public boolean isGUI()
true
if ZAP was started with GUI, false
otherwisepublic void setGUI(boolean GUI)
GUI
- true
if ZAP was started with GUI, false
otherwisepublic boolean isDaemon()
public void setDaemon(boolean daemon)
public boolean isLowMem()
public void setLowMem(boolean lowMem)
public boolean isExperimentalDb()
public void setExperimentalDb(boolean experimentalDb)
public boolean isReportVersion()
public boolean isDisplaySupportInfo()
public int getPort()
public String getHost()
@Deprecated public Hashtable<String,String> getConfigs()
getOrderedConfigs()
instead, which are in the order they
were specified.config
command line arguments, in no specific order.config
command line arguments.public Map<String,String> getOrderedConfigs()
config
command line arguments, in the order they were specified.config
command line arguments.public String getHelp()
public boolean isNoStdOutLog()
true
if the default logging through standard output should be disabled,
false
otherwise.public boolean isSilent()
public boolean isDevMode()
true
if the "dev mode" should be enabled, false
otherwise.DEV_MODE
public static String getHelp(List<CommandLineArgument[]> cmdList)
public boolean isEnabled(String keyword)
public static void info(String str)
CommandLineListener.execute(CommandLineArgument[])
implementations. It ensures that messages
are written to the log file and/or written to stdout as appropriate.str
- the informational messagepublic static void error(String str)
CommandLineListener.execute(CommandLineArgument[])
implementations. It ensures that messages
are written to the log file and/or written to stderr as appropriate.str
- the error messagepublic static void error(String str, Throwable e)
CommandLineListener.execute(CommandLineArgument[])
implementations. It ensures that messages
are written to the log file and/or written to stderr as appropriate.str
- the error messagee
- the cause of the error