类org.apache.http.conn.ManagedClientConnection源码实例Demo

下面列出了怎么用org.apache.http.conn.ManagedClientConnection的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: YiBo   文件: LibRequestDirector.java
/**
 * Shuts down the connection.
 * This method is called from a <code>catch</code> block in
 * {@link #execute execute} during exception handling.
 */
private void abortConnection() {
    ManagedClientConnection mcc = managedConn;
    if (mcc != null) {
        // we got here as the result of an exception
        // no response will be returned, release the connection
        managedConn = null;
        try {
            mcc.abortConnection();
        } catch (IOException ex) {
        	if (DEBUG) {
        		Logger.debug(ex.getMessage(), ex);
            }
        }
        // ensure the connection manager properly releases this connection
        try {
            mcc.releaseConnection();
        } catch (IOException ignored) {
        	if (DEBUG) {
        		Logger.debug("Error releasing connection", ignored);
        	}
        }
    }
}
 
 类所在包
 类方法
 同包方法