public abstract static class Listener.QueuedListener extends Listener
runnables. This allows the runnables to be processed on a
different thread, preventing the connection's update thread from being blocked.Listener.LagListener, Listener.QueuedListener, Listener.ReflectionListener, Listener.ThreadedListener| Constructor and Description |
|---|
Listener.QueuedListener(Listener listener) |
| Modifier and Type | Method and Description |
|---|---|
void |
connected(Connection connection)
Called when the remote end has been connected.
|
void |
disconnected(Connection connection)
Called when the remote end is no longer connected.
|
void |
idle(Connection connection)
Called when the connection is below the
idle threshold. |
protected abstract void |
queue(Runnable runnable) |
void |
received(Connection connection,
Object object)
Called when an object has been received from the remote end of the connection.
|
public Listener.QueuedListener(Listener listener)
public void connected(Connection connection)
ListenerListener.received(Connection, Object). This will be invoked on the same thread as Client.update(int) and
Server.update(int). This method should not block for long periods as other network activity will not be processed
until it returns.public void disconnected(Connection connection)
Listenerdisconnected in class Listenerpublic void received(Connection connection, Object object)
ListenerClient.update(int) and Server.update(int). This method should not block for long periods as other network
activity will not be processed until it returns.public void idle(Connection connection)
Listeneridle threshold.protected abstract void queue(Runnable runnable)
Copyright © 2014. All Rights Reserved.