|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.esotericsoftware.kryonet.Listener
public class Listener
Used to be notified about connection events.
Nested Class Summary | |
---|---|
static class |
Listener.LagListener
Delays the notification of the wrapped listener to simulate lag on incoming objects. |
static class |
Listener.QueuedListener
Wraps a listener and queues notifications as runnables . |
static class |
Listener.ReflectionListener
Uses reflection to called "received(Connection, XXX)" on the listener, where XXX is the received object type. |
static class |
Listener.ThreadedListener
Wraps a listener and processes notification events on a separate thread. |
Constructor Summary | |
---|---|
Listener()
|
Method Summary | |
---|---|
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 |
received(Connection connection,
java.lang.Object object)
Called when an object has been received from the remote end of the connection. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Listener()
Method Detail |
---|
public void connected(Connection connection)
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)
public void received(Connection connection, java.lang.Object object)
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |