001/* ----------------------------------------------------------------------------
002   The Kiwi Toolkit - A Java Class Library
003   Copyright (C) 1998-2004 Mark A. Lindner
004
005   This library is free software; you can redistribute it and/or
006   modify it under the terms of the GNU General Public License as
007   published by the Free Software Foundation; either version 2 of the
008   License, or (at your option) any later version.
009
010   This library is distributed in the hope that it will be useful,
011   but WITHOUT ANY WARRANTY; without even the implied warranty of
012   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
013   General Public License for more details.
014
015   You should have received a copy of the GNU General Public License
016   along with this library; if not, write to the Free Software
017   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
018   02111-1307, USA.
019 
020   The author may be contacted at: mark_a_lindner@yahoo.com
021   ----------------------------------------------------------------------------
022   $Log: LoggingEndpoint.java,v $
023   Revision 1.6  2004/05/05 21:22:45  markl
024   Comment header updates.
025
026   Revision 1.5  2003/01/19 09:42:39  markl
027   Javadoc & comment header updates.
028
029   Revision 1.4  2001/09/26 07:05:36  markl
030   Version fixes, email address fixes.
031
032   Revision 1.3  2001/03/12 05:43:34  markl
033   Javadoc cleanup.
034
035   Revision 1.2  1999/01/10 03:47:05  markl
036   added GPL header & RCS tag
037   ----------------------------------------------------------------------------
038*/
039
040package kiwi.util;
041
042import java.io.IOException;
043
044/** Logging endpoint interface. A logging endpoint accepts messages and writes
045  * them to a file, a graphical console window, or some other type of data
046  * sink.
047  *
048  * @author Mark Lindner
049  */
050
051public interface LoggingEndpoint
052  {
053
054  /** Informational message type. */
055  public static final int INFO = 0;
056
057  /** Status message type. */
058  public static final int STATUS = 1;
059
060  /** Warning message type. */
061  public static final int WARNING = 2;
062
063  /** Error condition message type. */
064  public static final int ERROR = 3;
065
066  /** Accept a new message. Writes the message to the data sink.
067    *
068    * @param type The message type; one of the static constants defined above.
069    * @param message The message.
070    */
071
072  public void logMessage(int type, String message);
073
074  /** Close the logging endpoint. The logging endpoint is closed. Once a
075    * logging endpoint is closed, it cannot accept any more messages.
076    */
077
078  public void close();
079  }
080
081/* end of source file */