de.bea.domingo.monitor
Class AbstractDefaultMonitor

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

public abstract class AbstractDefaultMonitor
extends AbstractMonitor

Abstract base class for implementations of the Monitor interface.

This class unifies logging to a single method for easy sub classing. Subclasses only have to implement the two methods monitor(java.lang.String) and monitor(java.lang.Throwable).

Author:
Kurt Riede

Field Summary
 
Fields inherited from class de.bea.domingo.monitor.AbstractMonitor
LEVELS
 
Fields inherited from interface de.bea.domingo.DNotesMonitor
DEBUG, DEFAULT_LEVEL, ERROR, FATAL, INFO, NONE, WARN
 
Constructor Summary
AbstractDefaultMonitor()
          Default constructor.
AbstractDefaultMonitor(int theLevel)
          Constructor.
 
Method Summary
 void debug(java.lang.String s)
          debug output.
 void debug(java.lang.String s, java.lang.Throwable throwable)
          debug output.
 void error(java.lang.String s)
          error output.
 void error(java.lang.String s, java.lang.Throwable throwable)
          error output.
 void fatalError(java.lang.String s)
          fatal error output.
 void fatalError(java.lang.String s, java.lang.Throwable throwable)
          fatal error output.
 void info(java.lang.String s)
          info output.
 void info(java.lang.String s, java.lang.Throwable throwable)
          info output.
protected abstract  void monitor(java.lang.String message)
          Abstract monitoring method, must be implemented by concrete monitors.
protected abstract  void monitor(java.lang.Throwable throwable)
          Abstract monitoring method, must be implemented by concrete monitors.
 void warn(java.lang.String s)
          warn output.
 void warn(java.lang.String s, java.lang.Throwable throwable)
          warn output.
 
Methods inherited from class de.bea.domingo.monitor.AbstractMonitor
isDebugEnabled, isErrorEnabled, isFatalErrorEnabled, isInfoEnabled, isNoMesssages, isWarnEnabled, setLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDefaultMonitor

public AbstractDefaultMonitor()
Default constructor.


AbstractDefaultMonitor

public AbstractDefaultMonitor(int theLevel)
Constructor.

Parameters:
theLevel - the level of the new monitor, can be one of DEBUG, INFO, WARN, ERROR or FATAL
Method Detail

debug

public final void debug(java.lang.String s)
debug output.

Parameters:
s - the message
See Also:
DNotesMonitor.debug(java.lang.String)

debug

public final void debug(java.lang.String s,
                        java.lang.Throwable throwable)
debug output.

Parameters:
s - the message
throwable - the throwable
See Also:
DNotesMonitor.debug(java.lang.String, java.lang.Throwable)

info

public final void info(java.lang.String s)
info output.

Parameters:
s - the message
See Also:
DNotesMonitor.info(java.lang.String)

info

public final void info(java.lang.String s,
                       java.lang.Throwable throwable)
info output.

Parameters:
s - the message
throwable - the throwable
See Also:
DNotesMonitor.info(java.lang.String, java.lang.Throwable)

warn

public final void warn(java.lang.String s)
warn output.

Parameters:
s - the message
See Also:
DNotesMonitor.warn(java.lang.String)

warn

public final void warn(java.lang.String s,
                       java.lang.Throwable throwable)
warn output.

Parameters:
s - the message
throwable - the throwable
See Also:
DNotesMonitor.warn(java.lang.String, java.lang.Throwable)

error

public final void error(java.lang.String s)
error output.

Parameters:
s - the message
See Also:
DNotesMonitor.error(java.lang.String)

error

public final void error(java.lang.String s,
                        java.lang.Throwable throwable)
error output.

Parameters:
s - the message
throwable - the throwable
See Also:
DNotesMonitor.error(java.lang.String, java.lang.Throwable)

fatalError

public final void fatalError(java.lang.String s)
fatal error output.

Parameters:
s - the message
See Also:
DNotesMonitor.fatalError(java.lang.String)

fatalError

public final void fatalError(java.lang.String s,
                             java.lang.Throwable throwable)
fatal error output.

Parameters:
s - the message
throwable - the throwable
See Also:
DNotesMonitor.fatalError(java.lang.String, java.lang.Throwable)

monitor

protected abstract void monitor(java.lang.String message)
Abstract monitoring method, must be implemented by concrete monitors.

Parameters:
message - a message to monitor

monitor

protected abstract void monitor(java.lang.Throwable throwable)
Abstract monitoring method, must be implemented by concrete monitors.

Parameters:
throwable - a throwable to monitor


Domingo Java-API