org.schmant.report
Class AbstractReport

java.lang.Object
  extended by org.schmant.report.AbstractReport
All Implemented Interfaces:
Report
Direct Known Subclasses:
AbstractPrintingReport, AsynchronousReport, MultiplexingReport

public abstract class AbstractReport
extends Object
implements Report

Abstract base class for Report implementations.

Since:
0.5
Author:
Karl Gustafsson

Constructor Summary
AbstractReport()
           
 
Method Summary
 void close()
          Close the current report.
 Level getLevel()
          Get the current log level.
 boolean isDebugReported()
          Are messages to debug level (Level.FINE) logged?
 boolean isErrorReported()
          Are messages to error level (Level.SEVERE) logged?
 boolean isInfoReported()
          Are messages to info level (Level.INFO) logged?
 boolean isLevelReported(Level l)
          Are messages to the supplied Level logged?
 boolean isOpen()
           
 boolean isTraceReported()
          Are messages to trace level (Level.FINER) logged?
 boolean isWarnReported()
          Are messages to warn level (Level.WARNING) logged?
 void setLevel(Level l)
          Set the log level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.schmant.report.Report
debug, error, error, getIdentifier, getStackTraceWriter, info, log, log, trace, warn, warn
 

Constructor Detail

AbstractReport

public AbstractReport()
Method Detail

setLevel

public void setLevel(Level l)
Description copied from interface: Report
Set the log level.

Specified by:
setLevel in interface Report
Parameters:
l - The log level.

getLevel

public Level getLevel()
Description copied from interface: Report
Get the current log level.

Specified by:
getLevel in interface Report
Returns:
The log level.

isLevelReported

public boolean isLevelReported(Level l)
Description copied from interface: Report
Are messages to the supplied Level logged?

Specified by:
isLevelReported in interface Report
Parameters:
l - The level.
Returns:
true if messages to the supplied level are logged.

isTraceReported

public boolean isTraceReported()
Description copied from interface: Report
Are messages to trace level (Level.FINER) logged?

Specified by:
isTraceReported in interface Report
Returns:
true if messages to trace level are logged.

isDebugReported

public boolean isDebugReported()
Description copied from interface: Report
Are messages to debug level (Level.FINE) logged?

Specified by:
isDebugReported in interface Report
Returns:
true if messages to debug level are logged.

isInfoReported

public boolean isInfoReported()
Description copied from interface: Report
Are messages to info level (Level.INFO) logged?

Specified by:
isInfoReported in interface Report
Returns:
true if messages to info level are logged.

isWarnReported

public boolean isWarnReported()
Description copied from interface: Report
Are messages to warn level (Level.WARNING) logged?

Specified by:
isWarnReported in interface Report
Returns:
true if messages to warn level are logged.

isErrorReported

public boolean isErrorReported()
Description copied from interface: Report
Are messages to error level (Level.SEVERE) logged?

Specified by:
isErrorReported in interface Report
Returns:
true if messages to error level are logged.

isOpen

public boolean isOpen()

close

public void close()
Description copied from interface: Report
Close the current report. After calling this method the report does not accept any new messages. This is called when Schmant exits or when a new report is started.

Specified by:
close in interface Report