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.appender; 16 17 import net.sourceforge.acelogger.Identifiable; 18 import net.sourceforge.acelogger.LogEvent; 19 20 /** 21 * A appender interface that provides methods needed to manage appending log calls, abstracting the 22 * configuration to the framework. 23 * 24 * @author Zardi (https://sourceforge.net/users/daniel_zardi) 25 * @version 1.0.0 26 * @since 1.0.0 27 */ 28 public interface Appender extends Identifiable { 29 30 /** 31 * Appends a log call using this appender. 32 * 33 * @param call 34 * The log call to be appended. 35 * @since 1.0.0 36 */ 37 public void appendLog(LogEvent call); 38 39 /** 40 * Appends a header to this appender. 41 * 42 * @since 1.0.0 43 */ 44 public void appendHeader(); 45 46 /** 47 * Appends a footer to this appender. 48 * 49 * @since 1.0.0 50 */ 51 public void appendFooter(); 52 53 /** 54 * This method is responsible for allocation and preparation of any resource used by this 55 * appender. 56 * 57 * @since 1.0.0 58 */ 59 public void open(); 60 61 /** 62 * This method is responsible for termination and deallocation of any resource used by this 63 * appender. 64 * 65 * @since 1.0.0 66 */ 67 public void close(); 68 69 }