nesstar.util
Class TestHandler

java.lang.Object
  extended by java.util.logging.Handler
      extended by nesstar.util.TestHandler

public class TestHandler
extends Handler

Author:
titto An implementation of the Handler used for testing purposes.
Logs are stored by the handler and can be retrieved using getLogs() to be compared with the expected behaviour.

Check the test suite for examples of use.


Constructor Summary
TestHandler(String className, Level level)
           
 
Method Summary
 void close()
           
 void flush()
           
 String[] getLogs()
           
 String getLogsToString()
           
 void publish(LogRecord rec)
           
 
Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, setEncoding, setErrorManager, setFilter, setFormatter, setLevel
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestHandler

public TestHandler(String className,
                   Level level)
Method Detail

publish

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

flush

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

close

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

getLogs

public String[] getLogs()

getLogsToString

public String getLogsToString()

Nesstar SDK

Copyright©2003 NSD - All Rights Reserved