01: /*
02: * LogFilter.java
03: *
04: * Created on 28. August 2003, 22:06
05: */
06:
07: package org.jzonic.jlo.filter;
08:
09: import java.util.Map;
10:
11: /**
12: * This interface describes a LogFilter. Such a filter
13: * can be used with a Logger or Channel or LogPipe.
14: * If the given message that should be logged matches
15: * the criterias the filter will return true and the
16: * request will be send to the LogProcessor.
17: *
18: * @author Andreas Mecky andreasmecky@yahoo.de
19: */
20: public interface LogFilter {
21:
22: /**
23: * This method will check if message matches.
24: *
25: * @param message the message as text
26: * @return true if there is a match
27: */
28: public boolean match(String message);
29:
30: /**
31: * This method is used by the XMLFileReader. All
32: * tags
33: * <code>
34: * <parameter name="...." value=".."/>
35: * </code>
36: * are put in the Map and the filter can grab out
37: * all parameters it needs.
38: *
39: * @param parameter a Map with key value pairs of names and values
40: */
41: public void setParameters(Map parameter);
42: }
|