com.kuka.comm
Interface ConnectionListener

All Known Implementing Classes:
BaseConnectionListener

public interface ConnectionListener

An interface to react connection states.


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.
 

Method Detail

onConnectionSuccessful

void onConnectionSuccessful(Connection connection)
This method is called if a connection to a robot has been established successfully.

Parameters:
connection - The Connection that has been connected successfully.

onConnectionFailed

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.

Parameters:
connection - The Connection that wasn't able to establish a connection..
ex - An exception that indicates the failure reason.

onConnectionTimeout

void onConnectionTimeout(Connection connection)
This method is called when the connection hasn't received data for the connection specific timeout.

Parameters:
connection - The Connection that received a timeout

onConnectionClosed

void onConnectionClosed(Connection connection)
This method is called if the connection has been closed.

Parameters:
connection - The Connection that has been closed.

onReceiveError

void onReceiveError(Connection connection,
                    Exception ex)
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.

Parameters:
connection - The Connection originating the error.
ex - The exception that occurred.


Copyright © 2019. All rights reserved.