public class ConnectionEvent extends EventObject
接続関連のイベントのソースに関する情報を提供するEventオブジェクトです。 ConnectionEventオブジェクトは、アプリケーションがプールされた接続を閉じたときやエラーが発生したときに生成されます。 ConnectionEventオブジェクトには、次の2種類の情報が含まれます。
SQLException
source| コンストラクタ | 説明 |
|---|---|
ConnectionEvent(PooledConnection con) |
指定された
PooledConnectionオブジェクトで初期化されたConnectionEventオブジェクトを構築します。 |
ConnectionEvent(PooledConnection con, SQLException ex) |
指定した
PooledConnectionオブジェクトとSQLExceptionオブジェクトによって初期化されたConnectionEventオブジェクトを構築します。 |
| 修飾子と型 | メソッド | 説明 |
|---|---|---|
SQLException |
getSQLException() |
この
ConnectionEventオブジェクトのSQLException値を取得します。 |
getSource, toStringpublic ConnectionEvent(PooledConnection con)
指定されたPooledConnectionオブジェクトで初期化されたConnectionEventオブジェクトを構築します。 SQLExceptionは、デフォルトでnullです。
con - イベントの生成元であるプールされた接続IllegalArgumentException - conがnullである場合。public ConnectionEvent(PooledConnection con, SQLException ex)
指定したPooledConnectionオブジェクトとSQLExceptionオブジェクトによって初期化されたConnectionEventオブジェクトを構築します。
con - イベントの生成元であるプールされた接続ex - アプリケーションにスローされるSQLExceptionオブジェクトIllegalArgumentException - conがnullである場合。public SQLException getSQLException()
このConnectionEventオブジェクトのSQLException値を取得します。 nullも可。
null バグまたは機能を送信
詳細なAPIリファレンスおよび開発者ドキュメントについては、Java SEのドキュメントを参照してください。 そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。
Copyright © 1993, 2025, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Documentation Redistribution Policyも参照してください。