com.kuka.comm
Class BaseServerListener

java.lang.Object
  extended by com.kuka.comm.BaseServerListener
All Implemented Interfaces:
ServerListener

public class BaseServerListener
extends Object
implements ServerListener

The corresponding adapter class for the ServerListener class that implements all event methods with an empty method body. You can derive a subclass of it and override only the event functions that you are interested in.


Constructor Summary
BaseServerListener()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseServerListener

public BaseServerListener()
Method Detail

onIncomingConnection

public void onIncomingConnection(Server server,
                                 Connection connection)
Description copied from interface: ServerListener
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 ServerListener.onAcceptedConnection(Server, Connection) event method instead, if you want to be notified only about accepted connections.

Specified by:
onIncomingConnection in interface ServerListener
Parameters:
server - The server on which the incoming connection is being processed.
connection - The incoming connection.

onAcceptedConnection

public void onAcceptedConnection(Server server,
                                 Connection connection)
Description copied from interface: ServerListener
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 ServerListener.onIncomingConnection(com.kuka.comm.Server, com.kuka.comm.Connection) event method instead, if you want to be notified about the incoming connections.

Specified by:
onAcceptedConnection in interface ServerListener
Parameters:
server - The server which accepted the connection.
connection - The accepted connection.

onRejectedConnection

public void onRejectedConnection(Server server,
                                 Connection connection)
Description copied from interface: ServerListener
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.

Specified by:
onRejectedConnection in interface ServerListener
Parameters:
server - The server which accepted the connection.
connection - The rejected connection.


Copyright © 2019. All rights reserved.