com.esotericsoftware.kryonet
Class Listener.ThreadedListener

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

public static class Listener.ThreadedListener
extends Listener.QueuedListener

Wraps a listener and processes notification events on a separate thread.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.esotericsoftware.kryonet.Listener
Listener.LagListener, Listener.QueuedListener, Listener.ReflectionListener, Listener.ThreadedListener
 
Constructor Summary
Listener.ThreadedListener(Listener listener)
          Creates a single thread to process notification events.
Listener.ThreadedListener(Listener listener, java.util.concurrent.ExecutorService threadPool)
          Uses the specified threadPool to process notification events.
 
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.ThreadedListener

public Listener.ThreadedListener(Listener listener)
Creates a single thread to process notification events.


Listener.ThreadedListener

public Listener.ThreadedListener(Listener listener,
                                 java.util.concurrent.ExecutorService threadPool)
Uses the specified threadPool to process notification events.

Method Detail

queue

public void queue(java.lang.Runnable runnable)