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

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

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

HttpConnection.isTransparent介绍

[英]Indicates if the connection is completely transparent from end to end.
[中]指示连接端到端是否完全透明。

代码示例

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

public boolean isTransparent() {
  if (hasConnection()) {
    return wrappedConnection.isTransparent();
  } else {
    return false;
  }
}

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

/**
 * Generates <tt>Proxy-Connection: Keep-Alive</tt> request header when 
 * communicating via a proxy server.
 *
 * @param state the {@link HttpState state} information associated with this method
 * @param conn the {@link HttpConnection connection} used to execute
 *        this HTTP method
 *
 * @throws IOException if an I/O (transport) error occurs. Some transport exceptions
 *                     can be recovered from.
 * @throws HttpException  if a protocol exception occurs. Usually protocol exceptions 
 *                    cannot be recovered from.
 */
protected void addProxyConnectionHeader(HttpState state,
                    HttpConnection conn)
throws IOException, HttpException {
  LOG.trace("enter HttpMethodBase.addProxyConnectionHeader("
       + "HttpState, HttpConnection)");
  if (!conn.isTransparent()) {
    if (getRequestHeader("Proxy-Connection") == null) {
      addRequestHeader("Proxy-Connection", "Keep-Alive");
    }
  }
}

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

buf.append(" ");
if (!connection.isTransparent()) {
  Protocol protocol = connection.getProtocol();
  buf.append(protocol.getScheme().toLowerCase());
  buf.append("/");
} else {
  if (!connection.isTransparent() && !requestPath.startsWith("/")) {
    buf.append("/");

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

if (!conn.isTransparent()) {

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

if (getStatusCode() == HttpStatus.SC_OK) {
  Header connectionHeader = null;
  if (!conn.isTransparent()) {
    connectionHeader = getResponseHeader("proxy-connection");

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

public boolean isTransparent() {
  if (hasConnection()) {
    return wrappedConnection.isTransparent();
  } else {
    return false;
  }
}

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

public boolean isTransparent() {
  if (hasConnection()) {
    return wrappedConnection.isTransparent();
  } else {
    return false;
  }
}

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

public boolean isTransparent() {
  if (hasConnection()) {
    return wrappedConnection.isTransparent();
  } else {
    return false;
  }
}

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

public boolean isTransparent() {
  if (hasConnection()) {
    return wrappedConnection.isTransparent();
  } else {
    return false;
  }
}

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

public boolean isTransparent() {
  if (hasConnection()) {
    return wrappedConnection.isTransparent();
  } else {
    return false;
  }
}

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

/**
 * Generates <tt>Proxy-Connection: Keep-Alive</tt> request header when 
 * communicating via a proxy server.
 *
 * @param state the {@link HttpState state} information associated with this method
 * @param conn the {@link HttpConnection connection} used to execute
 *        this HTTP method
 *
 * @throws IOException if an I/O (transport) error occurs. Some transport exceptions
 *                     can be recovered from.
 * @throws HttpException  if a protocol exception occurs. Usually protocol exceptions 
 *                    cannot be recovered from.
 */
protected void addProxyConnectionHeader(HttpState state,
                    HttpConnection conn)
throws IOException, HttpException {
  LOG.trace("enter HttpMethodBase.addProxyConnectionHeader("
       + "HttpState, HttpConnection)");
  if (!conn.isTransparent()) {
    if (getRequestHeader("Proxy-Connection") == null) {
      addRequestHeader("Proxy-Connection", "Keep-Alive");
    }
  }
}

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

/**
 * Generates <tt>Proxy-Connection: Keep-Alive</tt> request header when 
 * communicating via a proxy server.
 *
 * @param state the {@link HttpState state} information associated with this method
 * @param conn the {@link HttpConnection connection} used to execute
 *        this HTTP method
 *
 * @throws IOException if an I/O (transport) error occurs. Some transport exceptions
 *                     can be recovered from.
 * @throws HttpException  if a protocol exception occurs. Usually protocol exceptions 
 *                    cannot be recovered from.
 */
protected void addProxyConnectionHeader(HttpState state,
                    HttpConnection conn)
throws IOException, HttpException {
  LOG.trace("enter HttpMethodBase.addProxyConnectionHeader("
       + "HttpState, HttpConnection)");
  if (!conn.isTransparent()) {
    if (getRequestHeader("Proxy-Connection") == null) {
      addRequestHeader("Proxy-Connection", "Keep-Alive");
    }
  }
}

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

/**
 * Generates <tt>Proxy-Connection: Keep-Alive</tt> request header when 
 * communicating via a proxy server.
 *
 * @param state the {@link HttpState state} information associated with this method
 * @param conn the {@link HttpConnection connection} used to execute
 *        this HTTP method
 *
 * @throws IOException if an I/O (transport) error occurs. Some transport exceptions
 *                     can be recovered from.
 * @throws HttpException  if a protocol exception occurs. Usually protocol exceptions 
 *                    cannot be recovered from.
 */
protected void addProxyConnectionHeader(HttpState state,
                    HttpConnection conn)
throws IOException, HttpException {
  LOG.trace("enter HttpMethodBase.addProxyConnectionHeader("
       + "HttpState, HttpConnection)");
  if (!conn.isTransparent()) {
    if (getRequestHeader("Proxy-Connection") == null) {
      addRequestHeader("Proxy-Connection", "Keep-Alive");
    }
  }
}

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

/**
 * Generates <tt>Proxy-Connection: Keep-Alive</tt> request header when 
 * communicating via a proxy server.
 *
 * @param state the {@link HttpState state} information associated with this method
 * @param conn the {@link HttpConnection connection} used to execute
 *        this HTTP method
 *
 * @throws IOException if an I/O (transport) error occurs. Some transport exceptions
 *                     can be recovered from.
 * @throws HttpException  if a protocol exception occurs. Usually protocol exceptions 
 *                    cannot be recovered from.
 */
protected void addProxyConnectionHeader(HttpState state,
                    HttpConnection conn)
throws IOException, HttpException {
  LOG.trace("enter HttpMethodBase.addProxyConnectionHeader("
       + "HttpState, HttpConnection)");
  if (!conn.isTransparent()) {
    if (getRequestHeader("Proxy-Connection") == null) {
      addRequestHeader("Proxy-Connection", "Keep-Alive");
    }
  }
}

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

/**
 * Generates <tt>Proxy-Connection: Keep-Alive</tt> request header when 
 * communicating via a proxy server.
 *
 * @param state the {@link HttpState state} information associated with this method
 * @param conn the {@link HttpConnection connection} used to execute
 *        this HTTP method
 *
 * @throws IOException if an I/O (transport) error occurs. Some transport exceptions
 *                     can be recovered from.
 * @throws HttpException  if a protocol exception occurs. Usually protocol exceptions 
 *                    cannot be recovered from.
 */
protected void addProxyConnectionHeader(HttpState state,
                    HttpConnection conn)
throws IOException, HttpException {
  LOG.trace("enter HttpMethodBase.addProxyConnectionHeader("
       + "HttpState, HttpConnection)");
  if (!conn.isTransparent()) {
    if (getRequestHeader("Proxy-Connection") == null) {
      addRequestHeader("Proxy-Connection", "Keep-Alive");
    }
  }
}

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

buf.append(" ");
if (!connection.isTransparent()) {
  Protocol protocol = connection.getProtocol();
  buf.append(protocol.getScheme().toLowerCase());
  buf.append("/");
} else {
  if (!connection.isTransparent() && !requestPath.startsWith("/")) {
    buf.append("/");

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

if (getStatusCode() == HttpStatus.SC_OK) {
  Header connectionHeader = null;
  if (!conn.isTransparent()) {
    connectionHeader = getResponseHeader("proxy-connection");

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

if (getStatusCode() == HttpStatus.SC_OK) {
  Header connectionHeader = null;
  if (!conn.isTransparent()) {
    connectionHeader = getResponseHeader("proxy-connection");

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

if (getStatusCode() == HttpStatus.SC_OK) {
  Header connectionHeader = null;
  if (!conn.isTransparent()) {
    connectionHeader = getResponseHeader("proxy-connection");

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

if (getStatusCode() == HttpStatus.SC_OK) {
  Header connectionHeader = null;
  if (!conn.isTransparent()) {
    connectionHeader = getResponseHeader("proxy-connection");

相关文章

微信公众号

最新文章

更多

HttpConnection类方法