Android APIs
public class

ConnectionEvent

extends EventObject
implements Serializable
java.lang.Object
   ↳ java.util.EventObject
     ↳ javax.sql.ConnectionEvent

Class Overview

Sent when specific events happen on a PooledConnection object. These events are a facility to report when an application closes the pooled connection or when an error occurs in the pooled connection.

Summary

[Expand]
Inherited Fields
From class java.util.EventObject
Public Constructors
ConnectionEvent(PooledConnection theConnection)
Creates a connection event initialized with the supplied PooledConnection reporting that the application has closed the connection.
ConnectionEvent(PooledConnection theConnection, SQLException theException)
Creates a ConnectionEvent initialized with the supplied PooledConnection and with the supplied SQLException indicating that an error has occurred within the PooledConnection.
Public Methods
SQLException getSQLException()
Gets the SQLException which holds information about the error which occurred in the PooledConnection.
[Expand]
Inherited Methods
From class java.util.EventObject
From class java.lang.Object

Public Constructors

public ConnectionEvent (PooledConnection theConnection)

Added in API level 1

Creates a connection event initialized with the supplied PooledConnection reporting that the application has closed the connection.

Parameters
theConnection PooledConnection: the connection for which this event is created.

public ConnectionEvent (PooledConnection theConnection, SQLException theException)

Added in API level 1

Creates a ConnectionEvent initialized with the supplied PooledConnection and with the supplied SQLException indicating that an error has occurred within the PooledConnection.

Parameters
theConnection PooledConnection: the connection for which this event is created.
theException SQLException: information about the state of error that has occurred on the application side.

Public Methods

public SQLException getSQLException ()

Added in API level 1

Gets the SQLException which holds information about the error which occurred in the PooledConnection.

Returns
SQLException a SQLException containing information about the error. May be null if no error has occurred.