org.jomc.ri
Class DefaultListener

Package class diagram package DefaultListener
java.lang.Object
  extended by org.jomc.ri.DefaultListener
All Implemented Interfaces:
Listener

@Generated(value="org.jomc.tools.SourceFileProcessor 1.2.2",
           comments="See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2")
public class DefaultListener
extends Object
implements Listener

Default Listener implementation.

Identifier:
org.jomc.ri.DefaultListener
Name:
JOMC RI
Abstract:
No
Final:
No
Stateless:
No

Version:
1.1
Author:
Christian Schulte 1.1

Constructor Summary
DefaultListener()
          Creates a new DefaultListener instance.
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultListener

@Generated(value="org.jomc.tools.SourceFileProcessor 1.2.2",
           comments="See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2")
public DefaultListener()
Creates a new DefaultListener instance.

Method Detail

isDefaultEnabled

public static boolean isDefaultEnabled()
Gets a flag indicating the listener is enabled by default.

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.

Returns:
true, if the listener is enabled by default; false, if the listener is disabled by default.
See Also:
setDefaultEnabled(java.lang.Boolean)

setDefaultEnabled

public static void setDefaultEnabled(Boolean value)
Sets the flag indicating the listener is enabled by default.

Parameters:
value - The new value of the flag indicating the listener is enabled by default or null.
See Also:
isDefaultEnabled()

isEnabled

public final boolean isEnabled()
Gets a flag indicating the listener is enabled.

Returns:
true, if the listener is enabled; false, if the listener is disabled.
See Also:
isDefaultEnabled(), setEnabled(java.lang.Boolean)

setEnabled

public final void setEnabled(Boolean value)
Sets the flag indicating the listener is enabled.

Parameters:
value - The new value of the flag indicating the listener is enabled or null.
See Also:
isEnabled()

onLog

public void onLog(Level level,
                  String message,
                  Throwable throwable)
Gets called on logging.

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.

Specified by:
onLog in interface Listener
Parameters:
level - The level of the event.
message - The message of the event or null.
throwable - The throwable of the event or null.
Throws:
NullPointerException - if level is null.
See Also:
isEnabled()


Copyright © 2005-2012 The JOMC Project. All Rights Reserved.Get JOMC at SourceForge.net. Fast, secure and Free Open Source software downloads
Please note that this documentation is maintained by non-native english speaking authors. As such, you may encounter phrases or wordings which seem imprecise or may even have a totally different meaning to native english speaking readers than what the individual author was trying to express. If you are a native english speaking reader and find any such phrases or wordings we kindly ask you to send an email to the corresponding author and help us improve this documentation in order to avoid misunderstandings. You will find the authors' email addresses at the top of each class. Please accept our apologies for any inconvenience caused.