com.esotericsoftware.kryonet
Class Listener.LagListener

java.lang.Object
  extended by com.esotericsoftware.kryonet.Listener
      extended by com.esotericsoftware.kryonet.Listener.QueuedListener
          extended by com.esotericsoftware.kryonet.Listener.LagListener
Enclosing class:
Listener

public static class Listener.LagListener
extends Listener.QueuedListener

Delays the notification of the wrapped listener to simulate lag on incoming objects. Notification events are processed on a separate thread after a delay. Note that only incoming objects are delayed. To delay outgoing objects, use a LagListener at the other end of the connection.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.esotericsoftware.kryonet.Listener
Listener.LagListener, Listener.QueuedListener, Listener.ReflectionListener, Listener.ThreadedListener
 
Constructor Summary
Listener.LagListener(int lagMillisMin, int lagMillisMax, Listener listener)
           
 
Method Summary
 void queue(java.lang.Runnable runnable)
           
 
Methods inherited from class com.esotericsoftware.kryonet.Listener.QueuedListener
connected, disconnected, received
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Listener.LagListener

public Listener.LagListener(int lagMillisMin,
                            int lagMillisMax,
                            Listener listener)
Method Detail

queue

public void queue(java.lang.Runnable runnable)