public class ConnectionEvent extends EventObject
一个Event对象提供有关连接相关事件的信息来源。ConnectionEvent物体时所产生的应用关闭合并连接时发生错误。的ConnectionEvent对象包含两种信息:
SQLException即将投入到应用source| Constructor and Description |
|---|
ConnectionEvent(PooledConnection con)
构建了一个
ConnectionEvent对象与给定的
PooledConnection对象初始化。
|
ConnectionEvent(PooledConnection con, SQLException ex)
构建了一个
ConnectionEvent对象初始化与给定的
PooledConnection对象和
SQLException对象。
|
| Modifier and Type | Method and Description |
|---|---|
SQLException |
getSQLException()
检索此对象的
SQLException
ConnectionEvent。
|
getSource, toStringpublic ConnectionEvent(PooledConnection con)
构建了一个ConnectionEvent对象与给定的PooledConnection对象初始化。SQLException默认null。
con的池连接,作为事件源
IllegalArgumentException -如果
con是空的。
public ConnectionEvent(PooledConnection con, SQLException ex)
构建了一个ConnectionEvent对象初始化与给定的PooledConnection对象和SQLException对象。
con的池连接,作为事件源
ex的SQLException即将投入到应用
IllegalArgumentException -如果
con是空的。
public SQLException getSQLException()
检索此对象的SQLException ConnectionEvent。可能是null。
null
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.