de.bea.domingo.monitor
Class AbstractMonitor

java.lang.Object
  extended by de.bea.domingo.monitor.AbstractMonitor
All Implemented Interfaces:
DNotesMonitor
Direct Known Subclasses:
AbstractDefaultMonitor

public abstract class AbstractMonitor
extends java.lang.Object
implements DNotesMonitor

Abstract base class for implementations of the Monitor interface.

This class handles the level of monitors.

Author:
Kurt Riede

Field Summary
static java.util.Map LEVELS
          Map of all string representing valid levels to their corresponding integer value.
 
Fields inherited from interface de.bea.domingo.DNotesMonitor
DEBUG, DEFAULT_LEVEL, ERROR, FATAL, INFO, NONE, WARN
 
Constructor Summary
AbstractMonitor()
          Constructor.
AbstractMonitor(int theLevel)
          Constructor.
 
Method Summary
 boolean isDebugEnabled()
          Checks if debug output is enabled or not.
 boolean isErrorEnabled()
          Checks if error output is enabled or not.
 boolean isFatalErrorEnabled()
          Checks if fatal error output is enabled or not.
 boolean isInfoEnabled()
          Checks if info output is enabled or not.
 boolean isNoMesssages()
          Checks if the monitor level is set to NONE.
 boolean isWarnEnabled()
          Checks if warn output is enabled or not.
 void setLevel(int theLevel)
          Sets the monitoring level of the monitor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.bea.domingo.DNotesMonitor
debug, debug, error, error, fatalError, fatalError, info, info, warn, warn
 

Field Detail

LEVELS

public static final java.util.Map LEVELS
Map of all string representing valid levels to their corresponding integer value.

The standard values are represented by the following strings (not case sensitive): "DNotesMonitor.DEBUG", "DNotesMonitor.INFO", "DNotesMonitor.WARN", "DNotesMonitor.ERROR", "DNotesMonitor.FATAL" and "DNotesMonitor.NONE".

For convenience, also the following values are synonyms:

"TRACE"       -> DEBUG
"INFORMATION" -> INFO
"WARNING"     -> WARN
"FATALERROR"  -> FATAL
"NOTHING"     -> NONE
"DEFAULT"     -> WARN

Constructor Detail

AbstractMonitor

public AbstractMonitor()
Constructor.


AbstractMonitor

public AbstractMonitor(int theLevel)
Constructor.

Parameters:
theLevel - the level of the new monitor
Method Detail

setLevel

public final void setLevel(int theLevel)
Sets the monitoring level of the monitor.

See LEVELS for allowed values.

DNotesMonitor.DEBUG

Parameters:
theLevel - the new level

isFatalErrorEnabled

public final boolean isFatalErrorEnabled()
Checks if fatal error output is enabled or not.

Specified by:
isFatalErrorEnabled in interface DNotesMonitor
Returns:
trueif enabled, else false
See Also:
DNotesMonitor.isFatalErrorEnabled()

isErrorEnabled

public final boolean isErrorEnabled()
Checks if error output is enabled or not.

Specified by:
isErrorEnabled in interface DNotesMonitor
Returns:
trueif enabled, else false
See Also:
DNotesMonitor.isErrorEnabled()

isWarnEnabled

public final boolean isWarnEnabled()
Checks if warn output is enabled or not.

Specified by:
isWarnEnabled in interface DNotesMonitor
Returns:
trueif enabled, else false
See Also:
DNotesMonitor.isWarnEnabled()

isInfoEnabled

public final boolean isInfoEnabled()
Checks if info output is enabled or not.

Specified by:
isInfoEnabled in interface DNotesMonitor
Returns:
trueif enabled, else false
See Also:
DNotesMonitor.isInfoEnabled()

isDebugEnabled

public final boolean isDebugEnabled()
Checks if debug output is enabled or not.

Specified by:
isDebugEnabled in interface DNotesMonitor
Returns:
trueif enabled, else false
See Also:
DNotesMonitor.isDebugEnabled()

isNoMesssages

public final boolean isNoMesssages()
Checks if the monitor level is set to NONE.

Returns:
true if the monitor level is set to NONE, else false


Domingo Java-API