public final class Jomc extends Object
Constructor and Description |
---|
Jomc()
Creates a new
Jomc instance. |
Modifier and Type | Method and Description |
---|---|
static Level |
getDefaultLogLevel()
Gets the default log level events are logged at.
|
Level |
getLogLevel()
Gets the log level of the instance.
|
PrintWriter |
getPrintWriter()
Gets the print writer of the instance.
|
boolean |
isLoggable(Level level)
Checks if a message at a given level is provided to the listeners of the instance.
|
int |
jomc(String[] args)
Processes the given arguments and executes the corresponding command.
|
static void |
main(String[] args)
Main entry point.
|
static int |
run(String[] args)
Main entry point without exiting the VM.
|
static void |
setDefaultLogLevel(Level value)
Sets the default log level events are logged at.
|
void |
setLogLevel(Level value)
Sets the log level of the instance.
|
void |
setPrintWriter(PrintWriter value)
Sets the print writer of the instance.
|
public Jomc()
Jomc
instance.@IgnoreJRERequirement public PrintWriter getPrintWriter()
setPrintWriter(java.io.PrintWriter)
public void setPrintWriter(PrintWriter value)
value
- The new print writer of the instance or null
.getPrintWriter()
public static Level getDefaultLogLevel()
The default log level is controlled by system property org.jomc.cli.Jomc.defaultLogLevel
holding
the log level to log events at by default. If that property is not set, the WARNING
default is returned.
getLogLevel()
,
Level.parse(java.lang.String)
public static void setDefaultLogLevel(Level value)
value
- The new default level events are logged at or null
.getDefaultLogLevel()
public Level getLogLevel()
getDefaultLogLevel()
,
setLogLevel(java.util.logging.Level)
,
isLoggable(java.util.logging.Level)
public void setLogLevel(Level value)
value
- The new log level of the instance or null
.getLogLevel()
,
isLoggable(java.util.logging.Level)
public boolean isLoggable(Level level)
level
- The level to test.true
, if messages at level
are provided to the listeners of the instance;
false
, if messages at level
are not provided to the listeners of the instance.NullPointerException
- if level
is null
.getLogLevel()
,
setLogLevel(java.util.logging.Level)
public int jomc(String[] args)
args
- Arguments to process.Command.STATUS_SUCCESS
,
Command.STATUS_FAILURE
public static void main(String[] args)
args
- The application arguments.public static int run(String[] args)
args
- The application arguments.Command.STATUS_SUCCESS
,
Command.STATUS_FAILURE
Copyright © 2005–2016 The JOMC Project. All rights reserved.