-
- All Superinterfaces:
-
EventListener
public interface ConnectionEventListener extends EventListener
注册要通知
PooledConnection对象生成的事件的对象。ConnectionEventListener接口由连接池组件实现。 连接池组件通常由JDBC驱动程序供应商或其他系统软件供应商提供。 当应用程序使用监听器已注册的池连接完成时,JDBC驱动程序会通知ConnectionEventListener对象。 应用程序在PooledConnection对象的表示上调用方法close后发生通知。 一个ConnectionEventListener时出现连接错误由于事实也通知PooledConnection不宜供将来使用---服务器已经崩溃,例如。 监听器是通过JDBC驱动程序的驱动程序抛出之前通知SQLException使用的应用程序PooledConnection对象。- 从以下版本开始:
- 1.4
-
-
方法摘要
所有方法 实例方法 抽象方法 变量和类型 方法 描述 voidconnectionClosed(ConnectionEvent event)通知此ConnectionEventListener应用程序已在其池化连接的表示上调用方法close。voidconnectionErrorOccurred(ConnectionEvent event)通知此ConnectionEventListener发生了致命错误,并且无法再使用池化连接。
-
-
-
方法详细信息
-
connectionClosed
void connectionClosed(ConnectionEvent event)
通知此ConnectionEventListener应用程序已在其池化连接的表示上调用方法close。- 参数
-
event- 描述事件源的事件对象
-
connectionErrorOccurred
void connectionErrorOccurred(ConnectionEvent event)
通知此ConnectionEventListener发生了致命错误,并且无法再使用池化连接。 驱动程序在它将应用程序SQLException包含在给定的ConnectionEvent对象中之前发出此通知。- 参数
-
event-描述事件的源和含有一个事件对象SQLException驾驶员即将扔
-
-