|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ijsberg.iglu.util.io.ReceiverQueue
public class ReceiverQueue
A message queue which receives objects from a transmitter.
BasicChannel| Constructor Summary | |
|---|---|
ReceiverQueue()
Constructs a receiver with an unlimited queue size. |
|
ReceiverQueue(int limit)
Constructs a receiver with a limited queue size. |
|
| Method Summary | |
|---|---|
int |
available()
|
void |
clear()
Clears the queue. |
void |
close()
Closes the receiver (for incoming messages) but does not clear the queue. |
int |
getLimit()
|
int |
getNrofQueuedMessages()
|
boolean |
hasNext()
|
boolean |
isClosed()
|
void |
onReceive(Object object)
Receives an object from a channel. |
void |
onTransmissionClose()
Queue is closed when transmission closes. |
Object |
read()
Retrieves and removes the first object from the queue. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReceiverQueue()
public ReceiverQueue(int limit)
limit - maximum queue size| Method Detail |
|---|
public void onReceive(Object object)
onReceive in interface Receiverobject - public Object read()
read in interface Queuepublic boolean hasNext()
public void close()
close in interface Queuepublic void onTransmissionClose()
onTransmissionClose in interface Receiverpublic boolean isClosed()
isClosed in interface Queuepublic void clear()
public int getNrofQueuedMessages()
public int available()
available in interface Queuepublic int getLimit()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||