net.sf.dc.messages
Class Messages

java.lang.Object
  extended by net.sf.dc.messages.Messages

public class Messages
extends java.lang.Object

Message queue. All classes can store a message in this class. The message will be queued and written to the logfile and logform when the program has time to do so. The writing and displaying of messages is done by the class MessageWriter. Last in last out mechanism is used

Since:
1.3
Version:
0.50
Author:
Robert-Jan van der Waals

Field Summary
static int _ERROR
           
static int _LEAVEDATELESS
           
static int _QUERY
           
static int _SIMPLE
           
static int _STANDARD
           
static int _TABLESS
           
static boolean isNew
           
 
Constructor Summary
Messages()
          Starts the message writer thread
 
Method Summary
static void add(java.lang.String message, int type)
          Adds a message to the message pool
static void add(java.lang.Throwable throwable)
          Adds an error message to the message pool
static java.lang.String getNewMessages()
          Gets a message from the pool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_STANDARD

public static final int _STANDARD
See Also:
Constant Field Values

_LEAVEDATELESS

public static final int _LEAVEDATELESS
See Also:
Constant Field Values

_SIMPLE

public static final int _SIMPLE
See Also:
Constant Field Values

_QUERY

public static final int _QUERY
See Also:
Constant Field Values

_TABLESS

public static final int _TABLESS
See Also:
Constant Field Values

_ERROR

public static final int _ERROR
See Also:
Constant Field Values

isNew

public static boolean isNew
Constructor Detail

Messages

public Messages()
Starts the message writer thread

See Also:
MessagesWriter
Method Detail

add

public static void add(java.lang.Throwable throwable)
Adds an error message to the message pool

Parameters:
throwable - error to log

add

public static void add(java.lang.String message,
                       int type)
Adds a message to the message pool

Parameters:
message - message String
type - message type

getNewMessages

public static java.lang.String getNewMessages()
Gets a message from the pool. Always gets the first (last in, last out)