KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jzonic > jlo > filter > LogFilter


1 /*
2  * LogFilter.java
3  *
4  * Created on 28. August 2003, 22:06
5  */

6
7 package org.jzonic.jlo.filter;
8
9 import java.util.Map JavaDoc;
10 /**
11  * This interface describes a LogFilter. Such a filter
12  * can be used with a Logger or Channel or LogPipe.
13  * If the given message that should be logged matches
14  * the criterias the filter will return true and the
15  * request will be send to the LogProcessor.
16  *
17  * @author Andreas Mecky andreasmecky@yahoo.de
18  */

19 public interface LogFilter {
20  
21     /**
22      * This method will check if message matches.
23      *
24      * @param message the message as text
25      * @return true if there is a match
26      */

27     public boolean match(String JavaDoc message);
28     
29     /**
30      * This method is used by the XMLFileReader. All
31      * tags
32      * <code>
33      * <parameter name="...." value=".."/>
34      * </code>
35      * are put in the Map and the filter can grab out
36      * all parameters it needs.
37      *
38      * @param parameter a Map with key value pairs of names and values
39      */

40     public void setParameters(Map JavaDoc parameter);
41 }
42
Popular Tags