com.kuka.comm
Interface ServerListener

All Known Implementing Classes:
BaseServerListener

public interface ServerListener

An interface to be noticed when a new incoming connection connects to the server.


Method Summary
 void onAcceptedConnection(Server server, Connection connection)
          This event function will be called, whenever a Connection has been accepted by the Server.
 void onIncomingConnection(Server server, Connection connection)
          This event function will be called, whenever an incoming Connection has been created by the Server.
 void onRejectedConnection(Server server, Connection connection)
          This event function will be called, whenever a Connection has been rejected by the Server.
 

Method Detail

onIncomingConnection

void onIncomingConnection(Server server,
                          Connection connection)
This event function will be called, whenever an incoming Connection has been created by the Server. This event will be generated before the Connection is being processed by the NetConnectionHandler of the Server. Thus, the Connection might later get rejected or altered. Use the onAcceptedConnection(Server, Connection) event method instead, if you want to be notified only about accepted connections.

Parameters:
server - The server on which the incoming connection is being processed.
connection - The incoming connection.

onAcceptedConnection

void onAcceptedConnection(Server server,
                          Connection connection)
This event function will be called, whenever a Connection has been accepted by the Server. This event will be generated after the Connection has been processed by the NetConnectionHandler of the Server. In general, the Connection must not be equivalent to the incoming Connection, as the ConnectionHandler is allowed to alter the incoming Connection. Use the onIncomingConnection(com.kuka.comm.Server, com.kuka.comm.Connection) event method instead, if you want to be notified about the incoming connections.

Parameters:
server - The server which accepted the connection.
connection - The accepted connection.

onRejectedConnection

void onRejectedConnection(Server server,
                          Connection connection)
This event function will be called, whenever a Connection has been rejected by the Server. This event will be generated after the Connection has been processed by the NetConnectionHandler of the Server.

Parameters:
server - The server which accepted the connection.
connection - The rejected connection.


Copyright © 2019. All rights reserved.