FileDocCategorySizeDatePackage
ConnectionEvent.javaAPI DocAndroid 1.5 API2859Wed May 06 22:41:06 BST 2009javax.sql

ConnectionEvent

public class ConnectionEvent extends EventObject implements Serializable
Sent when specific events happen on a {@link 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.
since
Android 1.0

Fields Summary
private static final long
serialVersionUID
private SQLException
theSQLException
Constructors Summary
public ConnectionEvent(PooledConnection theConnection)
Creates a connection event initialized with the supplied {@code PooledConnection} reporting that the application has closed the connection.

param
theConnection the connection for which this event is created.
since
Android 1.0


                                                    
       
        super(theConnection);
    
public ConnectionEvent(PooledConnection theConnection, SQLException theException)
Creates a {@code ConnectionEvent} initialized with the supplied {@code PooledConnection} and with the supplied {@code SQLException} indicating that an error has occurred within the {@code PooledConnection}.

param
theConnection the connection for which this event is created.
param
theException information about the state of error that has occurred on the application side.
since
Android 1.0

        super(theConnection);
        theSQLException = theException;
    
Methods Summary
public java.sql.SQLExceptiongetSQLException()
Gets the {@code SQLException} which holds information about the error which occurred in the {@code PooledConnection}.

return
a {@code SQLException} containing information about the error. May be {@code null} if no error has occurred.
since
Android 1.0

        return theSQLException;