亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? jdbc4connection.java

?? 用于JAVA數據庫連接.解壓就可用,方便得很
?? JAVA
字號:
/*
 Copyright (C) 2002-2007 MySQL AB

 This program is free software; you can redistribute it and/or modify
 it under the terms of version 2 of the GNU General Public License as 
 published by the Free Software Foundation.

 There are special exceptions to the terms and conditions of the GPL 
 as it is applied to this software. View the full text of the 
 exception in file EXCEPTIONS-CONNECTOR-J in the directory of this 
 software distribution.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

 */

package com.mysql.jdbc;

import java.sql.Blob;
import java.sql.Clob;
import java.sql.SQLClientInfoException;
import java.sql.SQLException;
import java.sql.SQLXML;
import java.sql.NClob;
import java.sql.Struct;
import java.util.Properties;
import java.util.TimerTask;


import com.mysql.jdbc.ConnectionImpl;
import com.mysql.jdbc.Messages;
import com.mysql.jdbc.SQLError;
import com.mysql.jdbc.exceptions.NotYetImplementedException;

public class JDBC4Connection extends ConnectionImpl {
	private JDBC4ClientInfoProvider infoProvider;
	
	public JDBC4Connection(String hostToConnectTo, int portToConnectTo, Properties info, String databaseToConnectTo, String url) throws SQLException {
		super(hostToConnectTo, portToConnectTo, info, databaseToConnectTo, url);
		// TODO Auto-generated constructor stub
	}

	public SQLXML createSQLXML() throws SQLException {
		return new JDBC4MysqlSQLXML();
	}
	
	public java.sql.Array createArrayOf(String typeName, Object[] elements) throws SQLException {
		throw new NotYetImplementedException();
	}

	public Struct createStruct(String typeName, Object[] attributes) throws SQLException {
		throw new NotYetImplementedException();
	}

	public Properties getClientInfo() throws SQLException {
		return getClientInfoProviderImpl().getClientInfo(this);
	}

	public String getClientInfo(String name) throws SQLException {
		return getClientInfoProviderImpl().getClientInfo(this, name);
	}

	/**
	 * Returns true if the connection has not been closed and is still valid.  
	 * The driver shall submit a query on the connection or use some other 
	 * mechanism that positively verifies the connection is still valid when 
	 * this method is called.
	 * <p>
	 * The query submitted by the driver to validate the connection shall be 
	 * executed in the context of the current transaction.
	 * 
	 * @param timeout -		The time in seconds to wait for the database operation 
	 * 						used to validate the connection to complete.  If 
	 * 						the timeout period expires before the operation 
	 * 						completes, this method returns false.  A value of 
	 * 						0 indicates a timeout is not applied to the 
	 * 						database operation.
	 * <p>
	 * @return true if the connection is valid, false otherwise
         * @exception SQLException if the value supplied for <code>timeout</code> 
         * is less then 0
         * @since 1.6
	 */
	public synchronized boolean isValid(int timeout) throws SQLException {
		if (isClosed()) {
			return false;
		}
		
		TimerTask timeoutTask = null;
		
		if (timeout != 0) {
			getCancelTimer().schedule(new TimerTask() { 
				public void run() {
					new Thread() {
						public void run() {
							try {
								abortInternal();
							} catch (Throwable t) {
								throw new RuntimeException(t);
							}
						}
					}.start();	
				}
				}, timeout * 1000);
		}
		
		try {
			synchronized (getMutex()) {
				try {
					pingInternal(false);
					
					if (timeoutTask != null) {
						timeoutTask.cancel();
					}
					
					timeoutTask = null;
				} catch (Throwable t) {
					try {
						abortInternal();
					} catch (Throwable ignoreThrown) {
						// we're dead now anyway
					}
					
					return false;
				} finally {
					if (timeoutTask != null) {
						timeoutTask.cancel();
					}
				}
			}
		} catch (Throwable t) {
			return false;
		}
		
		return true;
	}

	public void setClientInfo(Properties properties) throws SQLClientInfoException {
		try {
			getClientInfoProviderImpl().setClientInfo(this, properties);
		} catch (SQLClientInfoException ciEx) {
			throw ciEx;
		} catch (SQLException sqlEx) {
			SQLClientInfoException clientInfoEx = new SQLClientInfoException();
			clientInfoEx.initCause(sqlEx);

			throw clientInfoEx;
		}
	}

	public void setClientInfo(String name, String value) throws SQLClientInfoException {
		try {
			getClientInfoProviderImpl().setClientInfo(this, name, value);
		} catch (SQLClientInfoException ciEx) {
			throw ciEx;
		} catch (SQLException sqlEx) {
			SQLClientInfoException clientInfoEx = new SQLClientInfoException();
			clientInfoEx.initCause(sqlEx);

			throw clientInfoEx;
		}
	}

    /**
     * Returns true if this either implements the interface argument or is directly or indirectly a wrapper
     * for an object that does. Returns false otherwise. If this implements the interface then return true,
     * else if this is a wrapper then return the result of recursively calling <code>isWrapperFor</code> on the wrapped
     * object. If this does not implement the interface and is not a wrapper, return false.
     * This method should be implemented as a low-cost operation compared to <code>unwrap</code> so that
     * callers can use this method to avoid expensive <code>unwrap</code> calls that may fail. If this method
     * returns true then calling <code>unwrap</code> with the same argument should succeed.
     *
     * @param interfaces a Class defining an interface.
     * @return true if this implements the interface or directly or indirectly wraps an object that does.
     * @throws java.sql.SQLException  if an error occurs while determining whether this is a wrapper
     * for an object with the given interface.
     * @since 1.6
     */
	public boolean isWrapperFor(Class<?> iface) throws SQLException {
		checkClosed();
		
		// This works for classes that aren't actually wrapping
		// anything
		return iface.isInstance(this);
	}

    /**
     * Returns an object that implements the given interface to allow access to non-standard methods,
     * or standard methods not exposed by the proxy.
     * The result may be either the object found to implement the interface or a proxy for that object.
     * If the receiver implements the interface then that is the object. If the receiver is a wrapper
     * and the wrapped object implements the interface then that is the object. Otherwise the object is
     *  the result of calling <code>unwrap</code> recursively on the wrapped object. If the receiver is not a
     * wrapper and does not implement the interface, then an <code>SQLException</code> is thrown.
     *
     * @param iface A Class defining an interface that the result must implement.
     * @return an object that implements the interface. May be a proxy for the actual implementing object.
     * @throws java.sql.SQLException If no object found that implements the interface 
     * @since 1.6
     */
    public <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException {
    	try {
    		// This works for classes that aren't actually wrapping
    		// anything
            return iface.cast(this);
        } catch (ClassCastException cce) {
            throw SQLError.createSQLException("Unable to unwrap to " + iface.toString(), 
            		SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
        }
    }
    
	/**
	 * @see java.sql.Connection#createBlob()
	 */
	public Blob createBlob() {
	    return new com.mysql.jdbc.Blob();
	}

	/**
	 * @see java.sql.Connection#createClob()
	 */
	public Clob createClob() {
	    return new com.mysql.jdbc.Clob();
	}

	/**
	 * @see java.sql.Connection#createNClob()
	 */
	public NClob createNClob() {
	    return new com.mysql.jdbc.JDBC4NClob();
	}
	
	protected synchronized JDBC4ClientInfoProvider getClientInfoProviderImpl() throws SQLException {
		if (this.infoProvider == null) {
			try {
				try {
					this.infoProvider = (JDBC4ClientInfoProvider)Util.getInstance(getClientInfoProvider(), 
							new Class[0], new Object[0]);
				} catch (SQLException sqlEx) {
					if (sqlEx.getCause() instanceof ClassCastException) {
						// try with package name prepended
						this.infoProvider = (JDBC4ClientInfoProvider)Util.getInstance(
								"com.mysql.jdbc." + getClientInfoProvider(), 
								new Class[0], new Object[0]);
					}
				}
			} catch (ClassCastException cce) {
				throw SQLError.createSQLException(Messages
						.getString("JDBC4Connection.ClientInfoNotImplemented", new Object[] {getClientInfoProvider()}), 
						SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
			}
			
			this.infoProvider.initialize(this, this.props);
		}
		
		return this.infoProvider;
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
天堂在线一区二区| 亚洲日本va在线观看| 欧美三级电影网| 激情国产一区二区| 国内不卡的二区三区中文字幕 | 精品理论电影在线观看| 欧美久久久久久久久中文字幕| 日本韩国视频一区二区| 精品视频全国免费看| 色综合久久久久综合体| 91麻豆精品视频| 欧美中文一区二区三区| 欧美一区二区视频免费观看| 欧美一级专区免费大片| 欧美变态口味重另类| 久久精品一二三| 亚洲综合视频在线| 欧美aaa在线| 成人综合婷婷国产精品久久| 国产成人啪免费观看软件| caoporm超碰国产精品| 欧美视频你懂的| 综合欧美亚洲日本| 国产一区二区三区精品欧美日韩一区二区三区 | 日本中文字幕一区二区视频| 国产99精品在线观看| 日韩欧美电影一区| 午夜精品久久久久久久| 91精品国产美女浴室洗澡无遮挡| 久久久精品蜜桃| 经典三级在线一区| 日韩视频在线你懂得| 亚洲制服丝袜一区| 在线亚洲高清视频| 亚洲男人的天堂一区二区 | 日韩女同互慰一区二区| 亚洲第一二三四区| 欧美精品一二三| 亚洲国产精品麻豆| 欧美男人的天堂一二区| 一区二区三区欧美亚洲| 91丨porny丨国产| 亚洲美腿欧美偷拍| 欧美精品久久久久久久久老牛影院 | 精品剧情v国产在线观看在线| 亚洲伊人伊色伊影伊综合网| 欧日韩精品视频| 亚洲成人资源在线| 欧美电视剧免费全集观看| 天堂蜜桃91精品| 日韩免费一区二区| 国产一区二三区| 国产精品污网站| 欧美午夜影院一区| 午夜影院久久久| 久久影视一区二区| 91社区在线播放| 麻豆极品一区二区三区| 中文字幕成人av| 欧美大片日本大片免费观看| 精品一区二区三区免费播放| 亚洲日本免费电影| 日韩美女在线视频 | 欧美国产一区在线| 欧美三级电影在线看| 国产成人8x视频一区二区| 亚洲天堂中文字幕| 日韩免费成人网| 欧美天天综合网| 99re这里只有精品首页| 日本午夜一区二区| 亚洲精品水蜜桃| 久久久久99精品国产片| 欧美日韩国产精品成人| 大白屁股一区二区视频| 激情五月婷婷综合| 午夜精品福利一区二区蜜股av| 国产日韩精品视频一区| 日韩欧美一区中文| 欧美日韩国产一区二区三区地区| 91麻豆自制传媒国产之光| 国产成人啪免费观看软件| 蜜桃视频在线观看一区二区| 亚洲国产欧美日韩另类综合| 亚洲女同女同女同女同女同69| 久久久天堂av| 国产精品美女久久久久久| 国产日产欧美一区二区视频| 久久久久97国产精华液好用吗| 26uuu久久天堂性欧美| 久久午夜免费电影| 国产精品视频九色porn| 欧美国产精品专区| 亚洲欧洲日产国产综合网| 日韩毛片精品高清免费| 夜夜精品视频一区二区 | 91精品国产乱码久久蜜臀| 日韩一级精品视频在线观看| 欧美中文字幕不卡| 欧美日韩视频专区在线播放| 日韩女优制服丝袜电影| 日本一区二区在线不卡| 日韩精品一级中文字幕精品视频免费观看 | 久久午夜免费电影| 亚洲日韩欧美一区二区在线| 视频在线观看一区二区三区| 国产成+人+日韩+欧美+亚洲| av成人动漫在线观看| 欧美电影免费提供在线观看| 亚洲激情自拍偷拍| 韩国成人在线视频| 欧美精品九九99久久| 国产精品美女一区二区在线观看| 免费精品视频在线| 欧美三级日韩三级| 亚洲一区二区三区影院| 99re这里都是精品| 国产精品对白交换视频| 国产盗摄视频一区二区三区| 欧美v日韩v国产v| 五月婷婷综合网| 欧美日韩成人综合| 亚洲成人777| 欧美天天综合网| 日韩黄色在线观看| 日韩欧美美女一区二区三区| 奇米四色…亚洲| 日韩一区二区免费在线观看| 奇米精品一区二区三区四区| 欧美日韩亚洲综合一区二区三区| 亚洲第一二三四区| 日韩一二三区不卡| 国产乱码字幕精品高清av | 久久国产福利国产秒拍| 欧美成人性福生活免费看| 韩国精品一区二区| 国产欧美日韩中文久久| 99久久亚洲一区二区三区青草| 国产精品大尺度| 欧美综合亚洲图片综合区| 亚洲高清免费在线| 久久嫩草精品久久久精品| 成人永久免费视频| 五月激情丁香一区二区三区| 欧美成人一级视频| 91日韩在线专区| 日本美女一区二区| 亚洲六月丁香色婷婷综合久久| 欧美日高清视频| 99re在线视频这里只有精品| 五月婷婷激情综合网| 中日韩免费视频中文字幕| 欧美日韩一级二级三级| 成人午夜短视频| 久久综合综合久久综合| 亚洲综合色区另类av| 国产日韩欧美高清在线| 欧美一二三区在线| 欧美揉bbbbb揉bbbbb| av男人天堂一区| 国产99久久久国产精品潘金| 日日欢夜夜爽一区| 亚洲国产精品久久艾草纯爱| 中文字幕高清一区| 久久男人中文字幕资源站| 欧美久久久久久蜜桃| 欧美日本免费一区二区三区| 99视频在线精品| 色综合欧美在线视频区| 色婷婷av一区| 91视频免费观看| 另类专区欧美蜜桃臀第一页| 亚洲日本丝袜连裤袜办公室| 精品国产91洋老外米糕| 91精品国产91久久综合桃花| 欧美美女网站色| 日韩一区二区三区在线| 视频在线在亚洲| 精品一区二区三区久久久| 国产在线视频一区二区| 粉嫩av一区二区三区粉嫩| 国产精品99久久久久久久vr| 成人免费毛片aaaaa**| 91女神在线视频| 91国产成人在线| 欧美成人vps| 中文字幕中文字幕中文字幕亚洲无线 | 色综合激情久久| 在线电影欧美成精品| 久久久亚洲国产美女国产盗摄 | 北条麻妃一区二区三区| 色香色香欲天天天影视综合网| 欧美日韩情趣电影| 国产亚洲欧美日韩在线一区| 最新中文字幕一区二区三区| 日韩1区2区3区| www.亚洲色图.com| 精品国产一区a| 亚洲成a人片在线不卡一二三区| 国产一区二区不卡在线|