public class OutputQueue extends Object
Modifier and Type | Field and Description |
---|---|
private boolean |
closed |
private static int |
DEFAULT_SIZE |
private List<Utterance> |
list |
private int |
size |
Constructor and Description |
---|
OutputQueue()
Creates a queue with the default size.
|
OutputQueue(int size)
Creates an OutputQueue with the given size.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the queue.
|
boolean |
isClosed()
Determines if the queue is closed.
|
Utterance |
pend()
Blocks until there is an utterance in the queue.
|
void |
post(Utterance utterance)
Posts the given utterance to the queue.
|
void |
removeAll()
Removes all items from this OutputQueue.
|
private int size
private static final int DEFAULT_SIZE
private volatile boolean closed
public OutputQueue(int size)
size
- the size of the queuepublic OutputQueue()
public void post(Utterance utterance)
utterance
- the utterance to postIllegalStateException
- if the queue is closedpublic void close()
public boolean isClosed()
public Utterance pend()
public void removeAll()
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses