
package uk.co.wingpath.util;

/**
* This interface is used to provide notification of recoverable errors and
* other information.
* The implementations of the methods in this interface would normally display
* the supplied message (e.g. in a status bar) or write it to a log file.
*/

public interface Reporter
{
    /**
    * This method is called to inform the user of an irrecoverable error.
    * @param msg message to be displayed or logged.
    */
    void fatal (String msg);

    /**
    * This method is called to inform the user of an irrecoverable error.
    * The stack trace of the supplied exception is included in the report.
    * @param msg message to be displayed or logged.
    * @param t exception to report, including its stack trace.
    */
    void fatal (String msg, Throwable t);

    /**
    * This method is called to inform the user of a recoverable error.
    * @param helpId help identifier for the message.
    * @param msg message to be displayed or logged.
    */
    void error (String helpId, String msg);

    /**
    * This method is called to warn the user of an unusual condition.
    * @param helpId help identifier for the message.
    * @param msg message to be displayed or logged.
    */
    void warning (String helpId, String msg);

    /**
    * This method is called to provide other information to the user.
    * @param helpId help identifier for the message.
    * @param msg message to be displayed or logged.
    */
    void info (String helpId, String msg);

    /**
    * This method is called to provide debug information to the user.
    * @param msg message to be displayed or logged.
    */
    void debug (String msg);

    /**
    * This method is called to provide debug information to the user.
    * The stack trace of the supplied exception is included in the report.
    * @param msg message to be displayed or logged.
    * @param t exception to report, including its stack trace.
    */
    void debug (String msg, Throwable t);

    /**
    * This method is called to provide trace information to the user.
    * @param msg message to be displayed or logged.
    */
    void trace (String msg);

    /**
    * This method is called to indicate that the previous message is no
    * longer relevant. It is used to clear a message display area (e.g.
    * status bar), but would normally be ignored for logging output.
    */
    void clear ();
}

