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