Queue is a definition of a data structure that may
act as a queue - that is, data can be added to one end of the
queue and data can be requested from the head end of the queue.
This class is thread safe for multiple producers and a single
consumer. The next() method will block until there is data in
This has now been modified so that it is compatible with
the earlier JDK1.1 in order to be suitable for running on
mobile appliances. This means replacing the LinkedList with
a Vector, which is hardly ideal, but this Queue is typically
only polled every second before dispatching messages.