Most visited


Recently visited


Added in API level 1

ConnectionEvent

public class ConnectionEvent
extends EventObject

java.lang.Object
   ↳ java.util.EventObject
     ↳ javax.sql.ConnectionEvent


An Event object that provides information about the source of a connection-related event. ConnectionEvent objects are generated when an application closes a pooled connection and when an error occurs. The ConnectionEvent object contains two kinds of information:

Summary


Inherited fields

From class java.util.EventObject

Public constructors

ConnectionEvent(PooledConnection con)

Constructs a ConnectionEvent object initialized with the given PooledConnection object.

ConnectionEvent(PooledConnection con, SQLException ex)

Constructs a ConnectionEvent object initialized with the given PooledConnection object and SQLException object.

Public methods

SQLException getSQLException()

Retrieves the SQLException for this ConnectionEvent object.

Inherited methods

From class java.util.EventObject
From class java.lang.Object

Public constructors


ConnectionEvent

Added in API level 1
ConnectionEvent (PooledConnection con)

Constructs a ConnectionEvent object initialized with the given PooledConnection object. SQLException defaults to null.

Parameters
con PooledConnection: the pooled connection that is the source of the event
Throws
IllegalArgumentException if con is null.

ConnectionEvent

Added in API level 1
ConnectionEvent (PooledConnection con, 
                SQLException ex)

Constructs a ConnectionEvent object initialized with the given PooledConnection object and SQLException object.

Parameters
con PooledConnection: the pooled connection that is the source of the event
ex SQLException: the SQLException about to be thrown to the application
Throws
IllegalArgumentException if con is null.

Public methods


getSQLException

Added in API level 1
SQLException getSQLException ()

Retrieves the SQLException for this ConnectionEvent object. May be null.

Returns
SQLException the SQLException about to be thrown or null

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Browse this site in English?

You requested a page in English, but your language preference for this site is English.

Would you like to change your language preference and browse this site in English? If you want to change your language preference later, use the language menu at the bottom of each page.