KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jzonic > jlo > handler > Handler


1 package org.jzonic.jlo.handler;
2
3 import org.jzonic.jlo.LogRecord;
4
5 import java.util.Map JavaDoc;
6 /**
7  * This is the interface for the <code>Handler</code>. It defines
8  * all methods that must be implemented by all handlers.
9  *
10  *@author Andreas Mecky
11  *@author Terry Dye
12  *@created 9. März 2002
13  *@version 1.0
14  */

15 public interface Handler {
16
17     /**
18      * This method takes a log-message as <code>String</code>
19      * and processes this message. This method is called when
20      * a <code>Formatter</code> is defined for a <code>Generator</code>.
21      *
22      * @param msg The log-message
23      */

24     public void publish(String JavaDoc msg);
25
26
27     /**
28      * This method takes a <code>LogRecord</code> and then
29      * processes the request. It is called when no <code>Formatter</code>
30      * it defined inside the <code>Generator</code>. The specific handler
31      * is responsible for formatting the message itself.
32      *
33      * @param lr The <code>LogRecord</code> that contains all informations
34      * for the logging-request
35      */

36     public void publish(LogRecord lr);
37
38
39     /**
40      * This method takes a <code>Hashtable</code> with
41      * parameters that are defined for a handler
42      *
43      * @param parameters all parameters that are defined inside the generator block
44      */

45     public void setParameter(Map JavaDoc parameters);
46 }
47
Popular Tags