org.ceryle.util
Interface MessageWriter

All Known Implementing Classes:
Desktop, FindReplaceDialog, FindTopicDialog, KeywordPanel, MessageHandlerImpl, MessageView, ResourceSelectionDialog, TimeExtentDialog, WelcomeWindow, XNodeShell

public interface MessageWriter

A simple interface between a MessageHandler and any implementing class, which registers and then reports message, warning, or error events through the interface.

Since:
JDK1.3
Version:
$Id: MessageWriter.java,v 3.4 2007-06-15 12:09:56 altheim Exp $
Author:
Murray Altheim

Method Summary
 String writeMessage(int status, String message)
          Write the contents of the String message to a message display (eg., stdout) with any indication of message type provided by the status parameter, whose values are one of the state values from MessageHandler: OK no activity LOG a log message has occurred.
 void writeMessage(String message)
          Write the contents of the String message to a message display (eg., stdout).
 void writeStatus(String message)
          Write the contents of the String message to a status display (eg., stdout).
 

Method Detail

writeMessage

String writeMessage(int status,
                    String message)
Write the contents of the String message to a message display (eg., stdout) with any indication of message type provided by the status parameter, whose values are one of the state values from MessageHandler:
OK
no activity
LOG
a log message has occurred.
INFO
an informational message has occurred.
WARN
a warning message has occurred.
ERROR
a (possibly) recoverable error has occurred.
FATAL
a fatal (abortive) error has occurred.

Implementors of this method will be expected to prepend "Error:", "Warning:", etc. (or color the message) as appropriate. I.e., that the message will not already contain such notification.

Returns:
the String value of the message, including any changes made.
See Also:
MessageHandler

writeMessage

void writeMessage(String message)
Write the contents of the String message to a message display (eg., stdout).


writeStatus

void writeStatus(String message)
Write the contents of the String message to a status display (eg., stdout).



The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.