Client applications should implement this interface if they wish to receive notifications when the state of a {@link Connection} changes or an error is thrown.
Implementations of this interface can be bound to the connection by calling {@link Connection#bind(ConnectionState,ConnectionEventListener)}. The connection itself can be retrieved from the {@link com.pusher.client.Pusher} object by calling{@link com.pusher.client.Pusher#getConnection()}.
Alternatively, you can bind your implementation of the interface and connect at the same time by calling {@link com.pusher.client.Pusher#connect(ConnectionEventListener,ConnectionState)}.
A ConnectionEventListener is an object that registers to receive events generated by a PooledConnection.
The ConnectionEventListener interface is implemented by a connection pooling component. A connection pooling component will usually be provided by a JDBC driver vendor, or another system software vendor. A ConnectionEventListener is notified by a JDBC driver when an application is finished using its Connection object. This event occurs after the application calls close on its representation of the PooledConnection. A ConnectionEventListener is also notified when a Connection error occurs due to the fact that the PooledConnection is unfit for future use---the server has crashed, for example. The listener is notified, by the JDBC driver, just before the driver throws an SQLException to the application using the PooledConnection.
|
|
|
|
|
|