rjw.dc.messages
Class Messages

java.lang.Object
  |
  +--rjw.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:
DC0.50
Author:
Robert-Jan van der Waals

Field Summary
static int _ERROR
          Error message type
static int _LEAVEDATELESS
          Dateless message type
static int _QUERY
          Query
static int _SIMPLE
          Only the message text is displayed (indented)
static int _STANDARD
          Unspecief message type
static int _TABLESS
          Unindented message type
static boolean isNew
           
 
Constructor Summary
Messages()
          Starts the message writer thread
 
Method Summary
static java.lang.String getNewMessages()
          Gets a message from the pool.
static void setMessage(java.lang.String message, int type)
          Adds a message to the message pool
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_STANDARD

public static final int _STANDARD
Unspecief message type

See Also:
Constant Field Values

_LEAVEDATELESS

public static final int _LEAVEDATELESS
Dateless message type

See Also:
Constant Field Values

_SIMPLE

public static final int _SIMPLE
Only the message text is displayed (indented)

See Also:
Constant Field Values

_QUERY

public static final int _QUERY
Query

See Also:
Constant Field Values

_TABLESS

public static final int _TABLESS
Unindented message type

See Also:
Constant Field Values

_ERROR

public static final int _ERROR
Error message type

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

setMessage

public static void setMessage(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)

Returns:
(String) message text