Enclosing class:
: Session
public static interface Session.ConnectionListener
Monitors when other clients connect and disconnect to the session.
See Also:
: - Session.setConnectionListener(ConnectionListener listener)
Method Summary
All MethodsInstance MethodsAbstract Methods
Modifier and Type
Method
Description
void
onConnectionCreated(Session session, Connection connection)
Invoked when another client connects to the session.
void
onConnectionDestroyed(Session session, Connection connection)
Invoked when another client leaves the session.
Method Details
onConnectionCreated
void onConnectionCreated(Session session, Connection connection)
Invoked when another client connects to the session. The
Connection object represents the client's connection to the session.
Note that this method is invoked when other clients connect to
the session. When your own client client connects, the
Session.SessionListener.onConnected(Session session) method
is called.
Parameters:
: session - The session.
: connection - The new connection in the session.
onConnectionDestroyed
void onConnectionDestroyed(Session session, Connection connection)
Invoked when another client leaves the session. The Connection object
represents the client's previous connection to the session. When your
own client client disconnects, the
Session.SessionListener.onDisconnected(Session session)
method is called.
Parameters:
: session - The session.
: connection - The connection that left the session the session.