View Javadoc

1   /**
2    * Logback: the generic, reliable, fast and flexible logging framework.
3    * 
4    * Copyright (C) 2000-2009, QOS.ch
5    * 
6    * This library is free software, you can redistribute it and/or modify it under
7    * the terms of the GNU Lesser General Public License as published by the Free
8    * Software Foundation.
9    */
10  package ch.qos.logback.core.joran.spi;
11  
12  import java.util.List;
13  
14  import ch.qos.logback.core.joran.action.Action;
15  
16  /**
17   * 
18   * As its name indicates, a RuleStore contains 2-tuples consists of a Pattern
19   * and an Action.
20   * 
21   * <p>As a joran configurator goes through the elements in a document, it asks
22   * the rule store whether there are rules matching the current pattern by
23   * invoking the {@link #matchActions(Pattern)} method.
24   * 
25   * @author Ceki G&uuml;lc&uuml;
26   * 
27   */
28  public interface RuleStore {
29    public void addRule(Pattern pattern, String actionClassStr)
30        throws ClassNotFoundException;
31  
32    public void addRule(Pattern pattern, Action action);
33  
34    public List matchActions(Pattern currentPatern);
35  }