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

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

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

HttpConnection.setStaleCheckingEnabled介绍

[英]Sets whether or not isStale() will be called when testing if this connection is open.

Setting this flag to false will increase performance when reusing connections, but it will also make them less reliable. Stale checking ensures that connections are viable before they are used. When set to false some method executions will result in IOExceptions and they will have to be retried.
[中]设置在测试此连接是否打开时是否调用isStale()。
将此标志设置为false将提高重用连接时的性能,但也会降低连接的可靠性。陈旧检查确保连接在使用前是可行的。当设置为false时,某些方法执行将导致IOException,必须重试。

代码示例

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

/**
 * @deprecated 
 */
public void setStaleCheckingEnabled(boolean staleCheckEnabled) {
  if (hasConnection()) {
    wrappedConnection.setStaleCheckingEnabled(staleCheckEnabled);
  } else {
    throw new IllegalStateException("Connection has been released");
  }
}

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

/**
 * @deprecated 
 */
public void setStaleCheckingEnabled(boolean staleCheckEnabled) {
  if (hasConnection()) {
    wrappedConnection.setStaleCheckingEnabled(staleCheckEnabled);
  } else {
    throw new IllegalStateException("Connection has been released");
  }
}

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

/**
 * @deprecated 
 */
public void setStaleCheckingEnabled(boolean staleCheckEnabled) {
  if (hasConnection()) {
    wrappedConnection.setStaleCheckingEnabled(staleCheckEnabled);
  } else {
    throw new IllegalStateException("Connection has been released");
  }
}

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

/**
 * @deprecated 
 */
public void setStaleCheckingEnabled(boolean staleCheckEnabled) {
  if (hasConnection()) {
    wrappedConnection.setStaleCheckingEnabled(staleCheckEnabled);
  } else {
    throw new IllegalStateException("Connection has been released");
  }
}

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

/**
 * @deprecated 
 */
public void setStaleCheckingEnabled(boolean staleCheckEnabled) {
  if (hasConnection()) {
    wrappedConnection.setStaleCheckingEnabled(staleCheckEnabled);
  } else {
    throw new IllegalStateException("Connection has been released");
  }
}

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

/**
 * @deprecated 
 */
public void setStaleCheckingEnabled(boolean staleCheckEnabled) {
  if (hasConnection()) {
    wrappedConnection.setStaleCheckingEnabled(staleCheckEnabled);
  } else {
    throw new IllegalStateException("Connection has been released");
  }
}

相关文章

微信公众号

最新文章

更多

HttpConnection类方法