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, toString
public 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.