1 |
The jdceMessageQueue is implemented as a Linked List for faster operations of addition/removal of messages.
|
2 |
The message queue provides for reporting availability of data on the queuebesides providing for returning the queue Contents as a stream of bytes or an array of Strings.
|
3 |
The queue has a in-lined class the QueueEnumerator which provides an Enumeration of the QueueContents.
|
4 |
The queueWidget has pointers to the preceeding Element and the elements successor.
|
5 |
class QueueWidget {
|
6 |
Object object;
|
7 |
QueueWidget prev;
|
8 |
QueueWidget next;
|
9 |
|
10 |
QueueWidget(Object object,
|
11 |
QueueWidget queueWidget1, QueueWidget queueWidget2) {
|
12 |
this.object = object;
|
13 |
prev = queueWidget1;
|
14 |
next = queueWidget2;
|
15 |
}
|
16 |
}
|
17 |
Besides the operations mentioned above, the queue provides for handling priority messages expressed by the addItemToTop() method.
|