org.apache.commons.httpclient.HttpConnection.releaseConnection()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(4.6k)|赞(0)|评价(0)|浏览(106)

本文整理了Java中org.apache.commons.httpclient.HttpConnection.releaseConnection()方法的一些代码示例,展示了HttpConnection.releaseConnection()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpConnection.releaseConnection()方法的具体详情如下:
包路径:org.apache.commons.httpclient.HttpConnection
类名称:HttpConnection
方法名:releaseConnection

HttpConnection.releaseConnection介绍

[英]Releases the connection. If the connection is locked or does not have a connection manager associated with it, this method has no effect. Note that it is completely safe to call this method multiple times.
[中]释放连接。如果连接已锁定或没有关联的连接管理器,则此方法无效。请注意,多次调用此方法是完全安全的。

代码示例

代码示例来源:origin: commons-httpclient/commons-httpclient

/**
 * Insure that the connection is released back to the pool.
 */
private void ensureConnectionRelease() {
  if (responseConnection != null) {
    responseConnection.releaseConnection();
    responseConnection = null;
  }
}

代码示例来源:origin: commons-httpclient/commons-httpclient

public void releaseConnection() {
  if (!isLocked() && hasConnection()) {
    HttpConnection wrappedConnection = this.wrappedConnection;
    this.wrappedConnection = null;
    wrappedConnection.releaseConnection();
  } else {
    // do nothing
  }
}

代码示例来源:origin: commons-httpclient/commons-httpclient

connection.releaseConnection();

代码示例来源:origin: commons-httpclient/commons-httpclient

this.conn.releaseConnection();
    this.conn = null;
  && this.conn != null
) {
  this.conn.releaseConnection();

代码示例来源:origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

/**
 * Insure that the connection is released back to the pool.
 */
private void ensureConnectionRelease() {
  if (responseConnection != null) {
    responseConnection.releaseConnection();
    responseConnection = null;
  }
}

代码示例来源:origin: org.apache.commons/httpclient

/**
 * Insure that the connection is released back to the pool.
 */
private void ensureConnectionRelease() {
  if (responseConnection != null) {
    responseConnection.releaseConnection();
    responseConnection = null;
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient

/**
 * Insure that the connection is released back to the pool.
 */
private void ensureConnectionRelease() {
  if (responseConnection != null) {
    responseConnection.releaseConnection();
    responseConnection = null;
  }
}

代码示例来源:origin: org.zaproxy/zap

/**
 * Insure that the connection is released back to the pool.
 */
private void ensureConnectionRelease() {
  if (responseConnection != null) {
    responseConnection.releaseConnection();
    responseConnection = null;
  }
}

代码示例来源:origin: org.wso2.commons-httpclient/commons-httpclient

/**
 * Insure that the connection is released back to the pool.
 */
private void ensureConnectionRelease() {
  if (responseConnection != null) {
    responseConnection.releaseConnection();
    responseConnection = null;
  }
}

代码示例来源:origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

public void releaseConnection() {
  if (!isLocked() && hasConnection()) {
    HttpConnection wrappedConnection = this.wrappedConnection;
    this.wrappedConnection = null;
    wrappedConnection.releaseConnection();
  } else {
    // do nothing
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient

public void releaseConnection() {
  if (!isLocked() && hasConnection()) {
    HttpConnection wrappedConnection = this.wrappedConnection;
    this.wrappedConnection = null;
    wrappedConnection.releaseConnection();
  } else {
    // do nothing
  }
}

代码示例来源:origin: org.sonatype.nexus/nexus-proxy

public void releaseConnection() {
  if (!isLocked() && hasConnection()) {
    HttpConnection wrappedConnection = this.wrappedConnection;
    this.wrappedConnection = null;
    wrappedConnection.releaseConnection();
  } else {
    // do nothing
  }
}

代码示例来源:origin: org.apache.commons/httpclient

public void releaseConnection() {
  if (!isLocked() && hasConnection()) {
    HttpConnection wrappedConnection = this.wrappedConnection;
    this.wrappedConnection = null;
    wrappedConnection.releaseConnection();
  } else {
    // do nothing
  }
}

代码示例来源:origin: org.wso2.commons-httpclient/commons-httpclient

public void releaseConnection() {
  if (!isLocked() && hasConnection()) {
    HttpConnection wrappedConnection = this.wrappedConnection;
    this.wrappedConnection = null;
    wrappedConnection.releaseConnection();
  } else {
    // do nothing
  }
}

代码示例来源:origin: org.sonatype.nexus/nexus-proxy

connection.releaseConnection();

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient

connection.releaseConnection();

代码示例来源:origin: org.apache.commons/httpclient

connection.releaseConnection();

代码示例来源:origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

connection.releaseConnection();

代码示例来源:origin: org.wso2.commons-httpclient/commons-httpclient

connection.releaseConnection();

代码示例来源:origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

this.conn.releaseConnection();
    this.conn = null;
  && this.conn != null
) {
  this.conn.releaseConnection();

相关文章

微信公众号

最新文章

更多

HttpConnection类方法