1 /* 2 * This file is part of AceLogger. 3 * 4 * AceLogger is free software: you can redistribute it and/or modify it under the terms of the GNU 5 * Lesser General Public License as published by the Free Software Foundation, either version 3 of 6 * the License, or (at your option) any later version. 7 * 8 * AceLogger is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without 9 * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 10 * Lesser General Public License for more details. 11 * 12 * You should have received a copy of the GNU Lesser General Public License along with AceLogger. 13 * If not, see <http://www.gnu.org/licenses/lgpl-3.0.html>. 14 */ 15 package net.sourceforge.acelogger.configuration; 16 17 import java.io.InputStream; 18 import java.util.Collection; 19 20 /** 21 * Loads the logging system configuration from an external source. 22 * 23 * @author Zardi (https://sourceforge.net/users/daniel_zardi) 24 * @version 1.0.0 25 * @since 1.0.0 26 */ 27 public interface ConfigurationLoader { 28 29 /** 30 * Configures the logging system from the data contained in the source stream. 31 * 32 * @param source 33 * The source for the configuration data. Depending on the implementation this might 34 * be a file, url, etc. 35 * @since 1.0.0 36 */ 37 public void configureFrom(InputStream source); 38 39 /** 40 * Configures the logging system from multiple sources. If two sources define configurations for 41 * the same identifier, the later will be used (ie. the configuration will be overwritten). This 42 * behavior makes possible configuration inheritance and refinement. 43 * 44 * @param sources 45 * An array containing the various sources to be used during configuration. 46 * @see #configureFrom(InputStream) 47 */ 48 public void configureFromMultipleSources(InputStream... sources); 49 50 /** 51 * Configures the logging system from multiple sources. If two sources define configurations for 52 * the same identifier, the later will be used (ie. the configuration will be overwritten) based 53 * on the order returned by the collection's iterator. This 54 * behavior makes possible configuration inheritance and refinement. 55 * 56 * @param sources 57 * A collection containing the various sources to be used during configuration. 58 * @see #configureFrom(InputStream) 59 * @see Collection#iterator() 60 */ 61 public void configureFromMultipleSources(Collection<InputStream> sources); 62 63 }