Package eu.bandm.tools.message
Class MessageStore<M extends Message>
java.lang.Object
eu.bandm.tools.message.MessageStore_<M>
eu.bandm.tools.message.MessageStore<M>
- Type Parameters:
M- the type of the messages
- All Implemented Interfaces:
MessageReceiver<M>
Storage for a sequence of
Messages in order of their arrival.
All messages received are added to an internal sequential storage.
Additionally the nesting level of Message.Kind.logStart and
Message.Kind.logEnd messages is stored, which can be
rendered by a GUI.-
Nested Class Summary
Nested classes/interfaces inherited from class eu.bandm.tools.message.MessageStore_
MessageStore_.ListModel, MessageStore_.TableModel -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intInternal state for storing the nesting ofMessage.Kind.logStartandMessage.Kind.logEndmessages.Fields inherited from class eu.bandm.tools.message.MessageStore_
indents, listModel, messages, tableModel -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidResets nesting level to 0.voidAdds the received message to the internal store and notifies all GUI objects.Methods inherited from class eu.bandm.tools.message.MessageStore_
clear, drainAndClear, drainTo, get, getListModel, getMessages, getSize, getTableModel, isEmpty, notifyGuiAdd, notifyGuiChanged_ALL, setListModel, setTableModelMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface eu.bandm.tools.message.MessageReceiver
ifSubcriticalThen, ifSubcriticalThen, ifSubcriticalThenElse
-
Field Details
-
nestingLevel
protected int nestingLevelInternal state for storing the nesting ofMessage.Kind.logStartandMessage.Kind.logEndmessages. Is always >=0, also in case of inconsistent nesting of incomming messages.
-
-
Constructor Details
-
MessageStore
public MessageStore()Only constructor
-
-
Method Details
-
clearNestingLevel
public void clearNestingLevel()Resets nesting level to 0. -
receive
Adds the received message to the internal store and notifies all GUI objects.Indentation is increased after a
Message.Kind.logStartand decreased after aMessage.Kind.logEndmessage, but never goes below zero(0).- Specified by:
receivein interfaceMessageReceiver<M extends Message>- Specified by:
receivein classMessageStore_<M extends Message>- Parameters:
message- the received message.
-