Callback for when the state of a Connection changes (for example, when the Connection is established or when it is closed or fails). This callback will be called immediately when the listener is added to the connection with the current state of the connection (whether connected or disconnected) and then will be called whenever the state changes. All calls to connection state listeners are synchronized in a single thread, so application locking is not required if all access to required data structures is contained solely inside the listener. This callback must not be NULL.
|