org.xnap.plugin.opennap.net.msg
Class MessageStream

java.lang.Object
  extended by org.xnap.plugin.opennap.net.msg.MessageStream
All Implemented Interfaces:
MessageListener

public class MessageStream
extends java.lang.Object
implements MessageListener


Field Summary
protected  java.lang.Object lock
           
protected  java.util.LinkedList queue
           
protected  OpenNapServer server
           
 
Constructor Summary
MessageStream()
           
MessageStream(OpenNapServer server)
           
 
Method Summary
 boolean hasNext()
           
 boolean hasNext(long timeout)
          Waits for new msg at most timeout ms without timesteps of length step.
 boolean isCompetent(OpenNapServer server)
           
 void messageReceived(ServerMessage msg)
           
 ServerMessage next()
           
 void wakeup()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lock

protected java.lang.Object lock

queue

protected java.util.LinkedList queue

server

protected OpenNapServer server
Constructor Detail

MessageStream

public MessageStream(OpenNapServer server)

MessageStream

public MessageStream()
Method Detail

messageReceived

public void messageReceived(ServerMessage msg)
Specified by:
messageReceived in interface MessageListener

isCompetent

public boolean isCompetent(OpenNapServer server)

hasNext

public boolean hasNext(long timeout)
Waits for new msg at most timeout ms without timesteps of length step.


hasNext

public boolean hasNext()

next

public ServerMessage next()

wakeup

public void wakeup()


Copyright © 2001-2005 XNap Team. All Rights Reserved.