JavaTM Platform
Standard Ed. 6

javax.sql
クラス ConnectionEvent

java.lang.Object
  上位を拡張 java.util.EventObject
      上位を拡張 javax.sql.ConnectionEvent
すべての実装されたインタフェース:
Serializable

public class ConnectionEvent
extends EventObject

接続関連のイベントのソースに関する情報を提供する Event オブジェクトです。ConnectionEvent オブジェクトは、アプリケーションがプールされた接続を閉じたときやエラーが発生したときに生成されます。ConnectionEvent オブジェクトには、次の 2 種類の情報が含まれます。

導入されたバージョン:
1.4
関連項目:
直列化された形式

フィールドの概要
 
クラス java.util.EventObject から継承されたフィールド
source
 
コンストラクタの概要
ConnectionEvent(PooledConnection con)
          指定した PooledConnection オブジェクトによって初期化された ConnectionEvent オブジェクトを構築します。
ConnectionEvent(PooledConnection con, SQLException ex)
          指定した PooledConnection オブジェクトと SQLException オブジェクトによって初期化された ConnectionEvent オブジェクトを構築します。
 
メソッドの概要
 SQLException getSQLException()
          この ConnectionEvent オブジェクトに対する SQLException を取得します。
 
クラス java.util.EventObject から継承されたメソッド
getSource, toString
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

コンストラクタの詳細

ConnectionEvent

public ConnectionEvent(PooledConnection con)

指定した PooledConnection オブジェクトによって初期化された ConnectionEvent オブジェクトを構築します。SQLException のデフォルトは null です。

パラメータ:
con - イベントの生成元である PooledConnection オブジェクト
例外:
IllegalArgumentException - con が null の場合

ConnectionEvent

public ConnectionEvent(PooledConnection con,
                       SQLException ex)

指定した PooledConnection オブジェクトと SQLException オブジェクトによって初期化された ConnectionEvent オブジェクトを構築します。

パラメータ:
con - イベントの生成元である PooledConnection オブジェクト
ex - アプリケーションにスローされる SQLException オブジェクト
例外:
IllegalArgumentException - con が null の場合
メソッドの詳細

getSQLException

public SQLException getSQLException()

この ConnectionEvent オブジェクトに対する SQLException を取得します。null の場合がある

戻り値:
スローされる予定の SQLException、または null

JavaTM Platform
Standard Ed. 6

バグの報告と機能のリクエスト
さらに詳しい API リファレンスおよび開発者ドキュメントについては、Java SE 開発者用ドキュメントを参照してください。開発者向けの詳細な解説、概念の概要、用語の定義、バグの回避策、およびコード実例が含まれています。

Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。