ConnectionEvent
public class ConnectionEvent
extends EventObject
提供有关连接相关事件源的信息的Event对象。 ConnectionEvent对象在应用程序关闭池连接并发生错误时生成。 ConnectionEvent对象包含两种信息:
- The pooled connection closed by the application
- In the case of an error event, the
SQLException about to be thrown to the application
摘要(Summary)
Public constructors
ConnectionEvent
ConnectionEvent (PooledConnection con)
构造一个使用给定的ConnectionEvent对象初始化的PooledConnection对象。 SQLException默认为null 。
| 参数(Parameters) |
con |
PooledConnection: the pooled connection that is the source of the event |
ConnectionEvent
ConnectionEvent (PooledConnection con,
SQLException ex)
构造一个 ConnectionEvent给定初始化的对象 PooledConnection对象和 SQLException对象。
| 参数(Parameters) |
con |
PooledConnection: the pooled connection that is the source of the event |
ex |
SQLException: the SQLException about to be thrown to the application |
公共方法(Public methods)
getSQLException
SQLException getSQLException ()
检索SQLException此ConnectionEvent对象。 可能是null 。
| 返回(Returns) |
SQLException |
the SQLException about to be thrown or null |