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

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

?? simplehttpconnectionmanager.java

?? Light in the box 抓取程序。 使用HttpClient
?? JAVA
字號:
/* * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/java/org/apache/commons/httpclient/SimpleHttpConnectionManager.java,v 1.23 2004/10/16 22:40:08 mbecke Exp $ * $Revision: 480424 $ * $Date: 2006-11-29 06:56:49 +0100 (Wed, 29 Nov 2006) $ * * ==================================================================== * *  Licensed to the Apache Software Foundation (ASF) under one or more *  contributor license agreements.  See the NOTICE file distributed with *  this work for additional information regarding copyright ownership. *  The ASF licenses this file to You under the Apache License, Version 2.0 *  (the "License"); you may not use this file except in compliance with *  the License.  You may obtain a copy of the License at * *      http://www.apache.org/licenses/LICENSE-2.0 * *  Unless required by applicable law or agreed to in writing, software *  distributed under the License is distributed on an "AS IS" BASIS, *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *  See the License for the specific language governing permissions and *  limitations under the License. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation.  For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * */package org.apache.commons.httpclient;import java.io.IOException;import java.io.InputStream;import org.apache.commons.httpclient.params.HttpConnectionManagerParams;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;/** * A connection manager that provides access to a single HttpConnection.  This * manager makes no attempt to provide exclusive access to the contained * HttpConnection. * * @author <a href="mailto:becke@u.washington.edu">Michael Becke</a> * @author Eric Johnson * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a> * @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a> * @author Laura Werner *  * @since 2.0 */public class SimpleHttpConnectionManager implements HttpConnectionManager {    private static final Log LOG = LogFactory.getLog(SimpleHttpConnectionManager.class);    private static final String MISUSE_MESSAGE =         "SimpleHttpConnectionManager being used incorrectly.  Be sure that"        + " HttpMethod.releaseConnection() is always called and that only one thread"        + " and/or method is using this connection manager at a time.";        /**     * Since the same connection is about to be reused, make sure the     * previous request was completely processed, and if not     * consume it now.     * @param conn The connection     */    static void finishLastResponse(HttpConnection conn) {        InputStream lastResponse = conn.getLastResponseInputStream();        if (lastResponse != null) {            conn.setLastResponseInputStream(null);            try {                lastResponse.close();            } catch (IOException ioe) {                conn.close();            }        }    }        /** The http connection */    protected HttpConnection httpConnection;    /**     * Collection of parameters associated with this connection manager.     */    private HttpConnectionManagerParams params = new HttpConnectionManagerParams();     /**     * The time the connection was made idle.     */    private long idleStartTime = Long.MAX_VALUE;        /**     * Used to test if {@link #httpConnection} is currently in use      * (i.e. checked out).  This is only used as a sanity check to help     * debug cases where this connection manager is being used incorrectly.     * It will not be used to enforce thread safety.     */    private volatile boolean inUse = false;    private boolean alwaysClose = false;    /**     * The connection manager created with this constructor will try to keep the      * connection open (alive) between consecutive requests if the alwaysClose      * parameter is set to <tt>false</tt>. Otherwise the connection manager will      * always close connections upon release.     *      * @param alwaysClose if set <tt>true</tt>, the connection manager will always     *    close connections upon release.     */    public SimpleHttpConnectionManager(boolean alwaysClose) {        super();        this.alwaysClose = alwaysClose;    }        /**     * The connection manager created with this constructor will always try to keep      * the connection open (alive) between consecutive requests.     */    public SimpleHttpConnectionManager() {        super();    }        /**     * @see HttpConnectionManager#getConnection(HostConfiguration)     */    public HttpConnection getConnection(HostConfiguration hostConfiguration) {        return getConnection(hostConfiguration, 0);    }    /**     * Gets the staleCheckingEnabled value to be set on HttpConnections that are created.     *      * @return <code>true</code> if stale checking will be enabled on HttpConections     *      * @see HttpConnection#isStaleCheckingEnabled()     *      * @deprecated Use {@link HttpConnectionManagerParams#isStaleCheckingEnabled()},     * {@link HttpConnectionManager#getParams()}.     */    public boolean isConnectionStaleCheckingEnabled() {        return this.params.isStaleCheckingEnabled();    }    /**     * Sets the staleCheckingEnabled value to be set on HttpConnections that are created.     *      * @param connectionStaleCheckingEnabled <code>true</code> if stale checking will be enabled      * on HttpConections     *      * @see HttpConnection#setStaleCheckingEnabled(boolean)     *      * @deprecated Use {@link HttpConnectionManagerParams#setStaleCheckingEnabled(boolean)},     * {@link HttpConnectionManager#getParams()}.     */    public void setConnectionStaleCheckingEnabled(boolean connectionStaleCheckingEnabled) {        this.params.setStaleCheckingEnabled(connectionStaleCheckingEnabled);    }        /**     * This method always returns the same connection object. If the connection is already     * open, it will be closed and the new host configuration will be applied.     *      * @param hostConfiguration The host configuration specifying the connection     *        details.     * @param timeout this parameter has no effect. The connection is always returned     *        immediately.     * @since 3.0     */    public HttpConnection getConnectionWithTimeout(        HostConfiguration hostConfiguration, long timeout) {        if (httpConnection == null) {            httpConnection = new HttpConnection(hostConfiguration);            httpConnection.setHttpConnectionManager(this);            httpConnection.getParams().setDefaults(this.params);        } else {            // make sure the host and proxy are correct for this connection            // close it and set the values if they are not            if (!hostConfiguration.hostEquals(httpConnection)                || !hostConfiguration.proxyEquals(httpConnection)) {                                    if (httpConnection.isOpen()) {                    httpConnection.close();                }                httpConnection.setHost(hostConfiguration.getHost());                httpConnection.setPort(hostConfiguration.getPort());                httpConnection.setProtocol(hostConfiguration.getProtocol());                httpConnection.setLocalAddress(hostConfiguration.getLocalAddress());                httpConnection.setProxyHost(hostConfiguration.getProxyHost());                httpConnection.setProxyPort(hostConfiguration.getProxyPort());            } else {                finishLastResponse(httpConnection);            }        }        // remove the connection from the timeout handler        idleStartTime = Long.MAX_VALUE;        if (inUse) LOG.warn(MISUSE_MESSAGE);        inUse = true;                return httpConnection;    }    /**     * @see HttpConnectionManager#getConnection(HostConfiguration, long)     *      * @deprecated Use #getConnectionWithTimeout(HostConfiguration, long)     */    public HttpConnection getConnection(        HostConfiguration hostConfiguration, long timeout) {        return getConnectionWithTimeout(hostConfiguration, timeout);    }    /**     * @see HttpConnectionManager#releaseConnection(org.apache.commons.httpclient.HttpConnection)     */    public void releaseConnection(HttpConnection conn) {        if (conn != httpConnection) {            throw new IllegalStateException("Unexpected release of an unknown connection.");        }        if (this.alwaysClose) {            httpConnection.close();        } else {            // make sure the connection is reuseable            finishLastResponse(httpConnection);        }                inUse = false;        // track the time the connection was made idle        idleStartTime = System.currentTimeMillis();    }    /**     * Returns {@link HttpConnectionManagerParams parameters} associated      * with this connection manager.     *      * @since 2.1     *      * @see HttpConnectionManagerParams     */    public HttpConnectionManagerParams getParams() {        return this.params;    }    /**     * Assigns {@link HttpConnectionManagerParams parameters} for this      * connection manager.     *      * @since 2.1     *      * @see HttpConnectionManagerParams     */    public void setParams(final HttpConnectionManagerParams params) {        if (params == null) {            throw new IllegalArgumentException("Parameters may not be null");        }        this.params = params;    }        /**     * @since 3.0     */    public void closeIdleConnections(long idleTimeout) {        long maxIdleTime = System.currentTimeMillis() - idleTimeout;        if (idleStartTime <= maxIdleTime) {            httpConnection.close();        }    }        /**     * since 3.1     */    public void shutdown() {        httpConnection.close();    }    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品一区二区三区不卡牛牛| 精品噜噜噜噜久久久久久久久试看| 国产v日产∨综合v精品视频| 精品综合久久久久久8888| 亚洲成av人片观看| 日韩精品福利网| 美脚の诱脚舐め脚责91| 日本在线不卡视频一二三区| 日本在线不卡视频一二三区| 卡一卡二国产精品| 成人在线视频首页| 91视频国产观看| 欧日韩精品视频| 欧美一区二区在线免费观看| 欧美精品一区男女天堂| 国产精品无人区| 亚洲免费在线看| 日韩二区在线观看| 国产精品99久久久| 色综合久久久网| 91精品午夜视频| 26uuu国产日韩综合| 亚洲欧洲在线观看av| 亚洲精品乱码久久久久久久久| 亚洲一级二级在线| 久草精品在线观看| 99re6这里只有精品视频在线观看| 在线观看国产精品网站| 日韩欧美高清一区| 亚洲色图视频网| 全部av―极品视觉盛宴亚洲| 国产成人在线免费| 欧美中文字幕久久| 久久久精品tv| 香蕉影视欧美成人| 成人激情小说网站| 欧美一区二区三区在线观看| 国产精品免费视频观看| 丝袜美腿一区二区三区| 99视频有精品| 久久欧美中文字幕| 亚洲午夜私人影院| 高清不卡一二三区| 51久久夜色精品国产麻豆| 国产精品久久久久三级| 另类的小说在线视频另类成人小视频在线 | 国产精品综合视频| 欧美性受极品xxxx喷水| 国产欧美日韩激情| 免费高清在线一区| 欧美性极品少妇| 最新高清无码专区| 国产乱人伦精品一区二区在线观看 | 国产精品自拍网站| 日韩一区国产二区欧美三区| 亚洲女同女同女同女同女同69| 国产在线视频一区二区| 欧美人妖巨大在线| 亚洲免费在线电影| a级高清视频欧美日韩| 久久久国产精品午夜一区ai换脸| 蜜臀国产一区二区三区在线播放 | 久久激情五月婷婷| 日韩一区二区视频在线观看| 亚洲激情av在线| 99久久综合色| 国产精品毛片久久久久久久| 国产成人精品一区二区三区四区 | 亚洲成人福利片| 欧洲av在线精品| 日韩影院免费视频| 色综合天天综合狠狠| 欧美激情一区二区三区不卡| 国产精品888| 国产欧美日韩在线观看| 国产99精品在线观看| 久久精品视频免费| 成人免费视频视频| 国产精品短视频| 99久久久国产精品免费蜜臀| 综合精品久久久| 色女孩综合影院| 亚洲成在人线免费| 91精品蜜臀在线一区尤物| 日本人妖一区二区| 欧美www视频| 成人毛片视频在线观看| 国产精品丝袜在线| 在线免费观看成人短视频| 亚洲大型综合色站| 日韩网站在线看片你懂的| 国产在线日韩欧美| 国产精品私人影院| 色哟哟欧美精品| 人人狠狠综合久久亚洲| 久久久美女艺术照精彩视频福利播放| 国产91精品入口| 亚洲国产欧美在线| 久久综合一区二区| 在线观看亚洲专区| 久久精品国产成人一区二区三区 | 亚洲午夜久久久久久久久电影网| 欧美妇女性影城| 国产黑丝在线一区二区三区| 国产精品久久久久久亚洲伦| 欧美午夜电影在线播放| 久久er99热精品一区二区| 亚洲视频一二区| 欧美电影免费观看高清完整版在线| 国产美女精品在线| 亚洲国产精品久久久久婷婷884| 91精品一区二区三区久久久久久| 高清国产一区二区三区| 亚洲大型综合色站| 国产精品久久久久桃色tv| 欧美一级高清片在线观看| 91免费版在线| 黄页视频在线91| 亚洲成人激情自拍| 中文一区二区在线观看| 欧美一区二区黄色| 色噜噜久久综合| 风间由美一区二区三区在线观看 | aaa亚洲精品| 极品美女销魂一区二区三区免费| 日韩毛片一二三区| 精品少妇一区二区| 欧美剧在线免费观看网站 | 亚洲国产视频在线| 国产日韩欧美一区二区三区综合| 欧美中文字幕一区二区三区| 波多野结衣91| 成人性生交大片免费看中文| 久草热8精品视频在线观看| 亚洲国产wwwccc36天堂| 中文字幕人成不卡一区| 国产丝袜在线精品| 26uuu国产电影一区二区| 国产日韩欧美一区二区三区综合| 正在播放亚洲一区| 在线亚洲一区二区| 99精品久久99久久久久| 国产很黄免费观看久久| 激情六月婷婷久久| 久久99精品久久久久久动态图| 亚洲成a人v欧美综合天堂下载 | 久久精品免费看| 日韩精品一级中文字幕精品视频免费观看 | 亚洲欧美日韩精品久久久久| 国产欧美一区二区三区在线看蜜臀| 日韩精品一区二区三区在线观看| 欧美美女一区二区在线观看| 欧美日韩在线精品一区二区三区激情| 色呦呦一区二区三区| 欧日韩精品视频| 欧美日本国产视频| 777精品伊人久久久久大香线蕉| 欧美日产在线观看| 91精品国产91综合久久蜜臀| 日韩欧美国产综合| 久久蜜臀精品av| 亚洲自拍偷拍麻豆| 亚洲精品视频免费看| 亚洲在线观看免费| 香蕉久久一区二区不卡无毒影院 | 日韩一区二区三区免费看 | 美女一区二区三区在线观看| 麻豆国产欧美一区二区三区| 久草这里只有精品视频| 国产91精品一区二区| 色久优优欧美色久优优| 欧美日韩一区成人| 日韩一区二区电影在线| 久久久久久久久久久黄色| 中文在线资源观看网站视频免费不卡| 国产精品久久久久aaaa| 亚洲成人综合网站| 韩国v欧美v亚洲v日本v| 成人激情动漫在线观看| 欧美午夜理伦三级在线观看| 日韩午夜三级在线| 国产精品初高中害羞小美女文| 亚洲自拍偷拍欧美| 激情综合网av| 91视频在线观看免费| 日韩午夜激情电影| 国产精品素人视频| 日本伊人色综合网| 波多野结衣精品在线| 日韩亚洲欧美高清| 国产精品久久久久毛片软件| 偷拍与自拍一区| 成人99免费视频| 91精品免费观看| 亚洲女同女同女同女同女同69| 久久激情五月激情| 欧美色视频在线| 国产精品国产三级国产| 九九视频精品免费| 欧美日本在线播放|