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 . |
void |
received(Connection connection,
java.lang.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)
Listener
Listener.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)
Listener
disconnected
in class Listener
public void received(Connection connection, java.lang.Object object)
Listener
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 idle(Connection connection)
Listener
idle threshold
.