01: package org.jzonic.jlo.handler;
02:
03: import org.jzonic.jlo.LogRecord;
04:
05: import java.util.Map;
06:
07: /**
08: * This is the interface for the <code>Handler</code>. It defines
09: * all methods that must be implemented by all handlers.
10: *
11: *@author Andreas Mecky
12: *@author Terry Dye
13: *@created 9. März 2002
14: *@version 1.0
15: */
16: public interface Handler {
17:
18: /**
19: * This method takes a log-message as <code>String</code>
20: * and processes this message. This method is called when
21: * a <code>Formatter</code> is defined for a <code>Generator</code>.
22: *
23: * @param msg The log-message
24: */
25: public void publish(String msg);
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: * This method takes a <code>Hashtable</code> with
40: * parameters that are defined for a handler
41: *
42: * @param parameters all parameters that are defined inside the generator block
43: */
44: public void setParameter(Map parameters);
45: }
|