Example usage for org.apache.commons.httpclient.params HttpClientParams getConnectionManagerTimeout

List of usage examples for org.apache.commons.httpclient.params HttpClientParams getConnectionManagerTimeout

Introduction

In this page you can find the example usage for org.apache.commons.httpclient.params HttpClientParams getConnectionManagerTimeout.

Prototype

public long getConnectionManagerTimeout() 

Source Link

Usage

From source file:com.zimbra.common.util.ZimbraHttpConnectionManager.java

private static String dumpParams(String notes, HttpConnectionManagerParams connMgrParams,
        HttpClientParams clientParams) {
    // dump httpclient package defaults if params is null
    if (connMgrParams == null)
        connMgrParams = new HttpConnectionManagerParams();
    if (clientParams == null)
        clientParams = new HttpClientParams();

    StringBuilder sb = new StringBuilder();

    sb.append("======== " + notes + "========\n");

    sb.append("HttpConnectionManagerParams DefaultMaxConnectionsPerHost  : "
            + connMgrParams.getDefaultMaxConnectionsPerHost() + "\n");
    sb.append("HttpConnectionManagerParams MaxTotalConnections           : "
            + connMgrParams.getMaxTotalConnections() + "\n");

    sb.append("HttpConnectionParams ConnectionTimeout                    : "
            + connMgrParams.getConnectionTimeout() + "\n");
    sb.append(//from  w  w  w. j  a  v a2s.  co  m
            "HttpConnectionParams Linger                               : " + connMgrParams.getLinger() + "\n");
    sb.append("HttpConnectionParams ReceiveBufferSize                    : "
            + connMgrParams.getReceiveBufferSize() + "\n");
    sb.append("HttpConnectionParams SendBufferSize                       : " + connMgrParams.getSendBufferSize()
            + "\n");
    sb.append("HttpConnectionParams SoTimeout                            : " + connMgrParams.getSoTimeout()
            + "\n");
    sb.append("HttpConnectionParams TcpNoDelay                           : " + connMgrParams.getTcpNoDelay()
            + "\n");
    sb.append("HttpConnectionParams isStaleCheckingEnabled               : "
            + connMgrParams.isStaleCheckingEnabled() + "\n");

    // sb.append("HttpClientParams ALLOW_CIRCULAR_REDIRECTS            (no corresponding method?)
    sb.append("HttpClientParams ConnectionManagerClass               : "
            + clientParams.getConnectionManagerClass().getName() + "\n");
    sb.append("HttpClientParams ConnectionManagerTimeout             : "
            + clientParams.getConnectionManagerTimeout() + "\n");
    // sb.append("HttpClientParams MAX_REDIRECTS                       (no corresponding method?)
    sb.append("HttpClientParams isAuthenticationPreemptive()         : "
            + clientParams.isAuthenticationPreemptive() + "\n");
    // sb.append("HttpClientParams REJECT_RELATIVE_REDIRECT            (no corresponding method?)

    return sb.toString();
}