1 /** 2 * Logback: the reliable, generic, fast and flexible logging framework. 3 * Copyright (C) 1999-2015, 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 Gülcü 22 */ 23 public interface StatusManager { 24 25 /** 26 * Add a new status message. 27 * 28 * @param status 29 */ 30 void add(Status status); 31 32 /** 33 * Obtain a copy of the status list maintained by this StatusManager. 34 * 35 * @return 36 */ 37 List<Status> getCopyOfStatusList(); 38 39 /** 40 * Return the highest level of all the statii. 41 * 42 * @return 43 */ 44 // int getLevel(); 45 46 /** 47 * Return the number of status entries. 48 * 49 * @return 50 */ 51 int getCount(); 52 53 /** 54 * Add a status listener. 55 * 56 * @param listener 57 */ 58 59 /** 60 * Add a status listener. The StatusManager may decide to skip installation if 61 * an earlier instance was already installed. 62 * 63 * @param listener 64 * @return true if actually added, false if skipped 65 */ 66 boolean add(StatusListener listener); 67 68 /** 69 * ); Remove a status listener. 70 * 71 * @param listener 72 */ 73 void remove(StatusListener listener); 74 75 /** 76 * Clear the list of status messages. 77 */ 78 void clear(); 79 80 /** 81 * Obtain a copy of the status listener list maintained by this StatusManager 82 * 83 * @return 84 */ 85 List<StatusListener> getCopyOfStatusListenerList(); 86 87 }