View Javadoc

1   /**
2    * Logback: the reliable, generic, fast and flexible logging framework.
3    * Copyright (C) 1999-2009, QOS.ch. All rights reserved.
4    *
5    * This program and the accompanying materials are dual-licensed under
6    * either the terms of the Eclipse Public License v1.0 as published by
7    * the Eclipse Foundation
8    *
9    *   or (per the licensee's choosing)
10   *
11   * under the terms of the GNU Lesser General Public License version 2.1
12   * as published by the Free Software Foundation.
13   */
14  package ch.qos.logback.core.status;
15  
16  import java.util.List;
17  
18  /**
19   * Internal error messages (statii) are managed by instances of this interface.
20   * 
21   * @author Ceki Gulcu
22   */
23  public interface StatusManager {
24  
25    /**
26     * Add a new status message.
27     * 
28     * @param status
29     */
30    public void add(Status status);
31  
32    /**
33     * Obtain a copy of the status list maintained by this StatusManager.
34     * 
35     * @return
36     */
37    public List<Status> getCopyOfStatusList();
38  
39    /**
40     * Return the highest level of all the statii.
41     * 
42     * @return
43     */
44    public int getLevel();
45  
46    /**
47     * Return the number of status entries.
48     * 
49     * @return
50     */
51    public int getCount();
52  
53    /**
54     * Add a status listener.
55     * @param listener
56     */
57    public void add(StatusListener listener);
58    
59    /**
60     * Remove a status listener.
61     * 
62     * @param listener
63     */
64    public void remove(StatusListener listener);
65  
66  
67    /**
68     * Clear the list of status messages.
69     */
70    public void clear();
71  
72    
73    /**
74     * Obtain a copy of the status listener list maintained by this StatusManager
75     * 
76     * @return
77     */
78    public List<StatusListener> getCopyOfStatusListenerList();
79  
80  }