org.xnap.plugin.opennap.net
Class SendQueue
java.lang.Object
org.xnap.plugin.opennap.net.SendQueue
public class SendQueue
- extends java.lang.Object
Provides a message queue that is used by the OpenNapServerRunner
class.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
STATE_EMPTY
public static final int STATE_EMPTY
- See Also:
- Constant Field Values
STATE_WAITING
public static final int STATE_WAITING
- See Also:
- Constant Field Values
STATE_BUSY
public static final int STATE_BUSY
- See Also:
- Constant Field Values
SendQueue
public SendQueue(OpenNapServerRunner runner)
add
public void add(ClientMessage msg)
- Returns true, if a send worker needs to be notified.
getState
public int getState()
- Returns true, if a send worker is currently sending messages
from this queue.
isEmpty
public boolean isEmpty()
pop
public ClientMessage pop()
- Removes the top message from the queue.
- Returns:
- if queue is not empty, top message; null otherwise
send
public boolean send(ClientMessage msg)
setState
public void setState(int state)
Copyright © 2001-2005 XNap Team. All Rights Reserved.