|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xnap.plugin.overnet.net.MessageQueue
public class MessageQueue
Queues client messages and removes them from its list only if all bytes are written out. Addition and removal of messages is synchronized.
Constructor Summary | |
---|---|
MessageQueue()
|
Method Summary | |
---|---|
void |
add(OvernetClientMessage msg)
Adds a new message to the queue. |
void |
clear()
|
OvernetClientMessage |
getNextMessage()
Returns next message which has still some bytes to be written out. |
boolean |
hasRemaining()
Returns true if there is still a message available which must be written out. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MessageQueue()
Method Detail |
---|
public OvernetClientMessage getNextMessage()
getNextMessage()
which
doesn't write it out, doesn't remove the message from the queue.
public void add(OvernetClientMessage msg)
public boolean hasRemaining()
public void clear()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |