tom.platform
Class StatusHandler

java.lang.Object
  extended by java.util.logging.Handler
      extended by tom.platform.StatusHandler

public class StatusHandler
extends Handler


Constructor Summary
StatusHandler()
          Constructor
 
Method Summary
 void clear()
          Clear all previous records
 void close()
           
 void flush()
           
 RuntimeAlert getAlertForInput(String filePath)
           
 Map<String,RuntimeAlert> getAlertMap()
           
 boolean hasError()
           
 boolean hasLog(Level level)
           
 boolean hasWarning()
           
 boolean isLoggable(LogRecord record)
          This Handler keeps track of all LogRecords, therefore this method always returns true.
 int nbOfErrors()
           
 int nbOfLogs(Level level)
           
 int nbOfWarnings()
           
 void publish(LogRecord record)
           
 String toString()
           
 
Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StatusHandler

public StatusHandler()
Constructor

Method Detail

clear

public void clear()
Clear all previous records


publish

public void publish(LogRecord record)
Specified by:
publish in class Handler

close

public void close()
Specified by:
close in class Handler

flush

public void flush()
Specified by:
flush in class Handler

toString

public String toString()
Overrides:
toString in class Object

hasLog

public boolean hasLog(Level level)

hasError

public boolean hasError()

hasWarning

public boolean hasWarning()

nbOfLogs

public int nbOfLogs(Level level)

nbOfErrors

public int nbOfErrors()

nbOfWarnings

public int nbOfWarnings()

getAlertForInput

public RuntimeAlert getAlertForInput(String filePath)

getAlertMap

public Map<String,RuntimeAlert> getAlertMap()

isLoggable

public boolean isLoggable(LogRecord record)
This Handler keeps track of all LogRecords, therefore this method always returns true. Please note that since we receive the LogRecords from a Logger, we actually only keep track of logs with a Level equal or higher than the Logger's.

Overrides:
isLoggable in class Handler
Parameters:
record - a given LogRecord
Returns:
true