com.kuka.comm
Class BaseConnectionListener

java.lang.Object
  extended by com.kuka.comm.BaseConnectionListener
All Implemented Interfaces:
ConnectionListener

public class BaseConnectionListener
extends Object
implements ConnectionListener

The corresponding adapter class for the ConnectionListener 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
BaseConnectionListener()
           
 
Method Summary
 void onConnectionClosed(Connection connection)
          This method is called if the connection has been closed.
 void onConnectionFailed(Connection connection, Exception ex)
          This method is called if an initial connection failed due to the socket being not available or through timeout.
 void onConnectionSuccessful(Connection connection)
          This method is called if a connection to a robot has been established successfully.
 void onConnectionTimeout(Connection connection)
          This method is called when the connection hasn't received data for the connection specific timeout.
 void onReceiveError(Connection connection, Exception ex)
          Called when an error occurred during the receiving of data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseConnectionListener

public BaseConnectionListener()
Method Detail

onConnectionSuccessful

public void onConnectionSuccessful(Connection connection)
Description copied from interface: ConnectionListener
This method is called if a connection to a robot has been established successfully.

Specified by:
onConnectionSuccessful in interface ConnectionListener
Parameters:
connection - The Connection that has been connected successfully.

onConnectionTimeout

public void onConnectionTimeout(Connection connection)
Description copied from interface: ConnectionListener
This method is called when the connection hasn't received data for the connection specific timeout.

Specified by:
onConnectionTimeout in interface ConnectionListener
Parameters:
connection - The Connection that received a timeout

onConnectionFailed

public void onConnectionFailed(Connection connection,
                               Exception ex)
Description copied from interface: ConnectionListener
This method is called if an initial connection failed due to the socket being not available or through timeout.

Specified by:
onConnectionFailed in interface ConnectionListener
Parameters:
connection - The Connection that wasn't able to establish a connection..
ex - An exception that indicates the failure reason.

onConnectionClosed

public void onConnectionClosed(Connection connection)
Description copied from interface: ConnectionListener
This method is called if the connection has been closed.

Specified by:
onConnectionClosed in interface ConnectionListener
Parameters:
connection - The Connection that has been closed.

onReceiveError

public void onReceiveError(Connection connection,
                           Exception ex)
Description copied from interface: ConnectionListener
Called when an error occurred during the receiving of data. This gives no indication whether the connection is connected or broken but may indicate message loss.

Specified by:
onReceiveError in interface ConnectionListener
Parameters:
connection - The Connection originating the error.
ex - The exception that occurred.


Copyright © 2019. All rights reserved.