public void addConnectionListener ( ConnectionListener connectionListener ) { if ( connectionListener == null ) { return ; } if ( ! connectionListeners . contains ( connectionListener ) ) { connectionListeners . add ( connectionListener ) ; } }
Adds a connection listener to this connection that will be notified when the connection closes or fails .