@Generated(value="org.jomc.tools.SourceFileProcessor 1.3", comments="See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3") public class DefaultListener extends Object implements Listener
Listener
implementation.
Constructor and Description |
---|
DefaultListener()
Creates a new
DefaultListener instance. |
Modifier and Type | Method and Description |
---|---|
static boolean |
isDefaultEnabled()
Gets a flag indicating the listener is enabled by default.
|
boolean |
isEnabled()
Gets a flag indicating the listener is enabled.
|
void |
onLog(Level level,
String message,
Throwable throwable)
Gets called on logging.
|
static void |
setDefaultEnabled(Boolean value)
Sets the flag indicating the listener is enabled by default.
|
void |
setEnabled(Boolean value)
Sets the flag indicating the listener is enabled.
|
@Generated(value="org.jomc.tools.SourceFileProcessor 1.3", comments="See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3") public DefaultListener()
DefaultListener
instance.public static boolean isDefaultEnabled()
The default enabled flag is controlled by system property
org.jomc.ri.DefaultListener.defaultEnabled
holding a value indicating the listener is enabled by default.
If that property is not set, the true
default is returned.
true
, if the listener is enabled by default; false
, if the listener is disabled by
default.setDefaultEnabled(java.lang.Boolean)
public static void setDefaultEnabled(Boolean value)
value
- The new value of the flag indicating the listener is enabled by default or null
.isDefaultEnabled()
public final boolean isEnabled()
true
, if the listener is enabled; false
, if the listener is disabled.isDefaultEnabled()
,
setEnabled(java.lang.Boolean)
public final void setEnabled(Boolean value)
value
- The new value of the flag indicating the listener is enabled or null
.isEnabled()
public void onLog(Level level, String message, Throwable throwable)
This method prints messages to the "standard" system streams. Messages with a level greater than
WARNING
are printed to the system error stream. All other messages are printed to the system output
stream.
onLog
in interface Listener
level
- The level of the event.message
- The message of the event or null
.throwable
- The throwable of the event or null
.NullPointerException
- if level
is null
.isEnabled()
Copyright © 2005-2012 The JOMC Project. All Rights Reserved.