Examples of SimpleHttpConnectionManager


Examples of org.apache.commons.httpclient.SimpleHttpConnectionManager

    this(150, 2000, 2000, 1024 * 1024);
  }

  public GAEHttpClient(int maxConPerHost, int conTimeOutMs, int soTimeOutMs,
      int maxSize) {
    connectionManager = new SimpleHttpConnectionManager();
    HttpConnectionManagerParams params = connectionManager.getParams();
    params.setDefaultMaxConnectionsPerHost(maxConPerHost);
    params.setConnectionTimeout(conTimeOutMs);
    params.setSoTimeout(soTimeOutMs);

View Full Code Here

Examples of org.apache.commons.httpclient.SimpleHttpConnectionManager

    this(150, 2000, 2000, 1024 * 1024);
  }

  public HttpClient(int maxConPerHost, int conTimeOutMs, int soTimeOutMs,
      int maxSize) {
    connectionManager = new SimpleHttpConnectionManager();
    HttpConnectionManagerParams params = connectionManager.getParams();
    params.setDefaultMaxConnectionsPerHost(maxConPerHost);
    params.setConnectionTimeout(conTimeOutMs);
    params.setSoTimeout(soTimeOutMs);

View Full Code Here

Examples of org.apache.commons.httpclient.SimpleHttpConnectionManager

        // N.B. HostConfiguration.equals() includes proxy settings in the compare.
        HttpClient httpClient = map.get(hc);

        if ( httpClient == null )
        {
            httpClient = new HttpClient(new SimpleHttpConnectionManager());
            if (log.isDebugEnabled()) {
                log.debug("Created new HttpClient: @"+System.identityHashCode(httpClient));
            }
            httpClient.setHostConfiguration(hc);
            map.put(hc, httpClient);
View Full Code Here

Examples of org.apache.commons.httpclient.SimpleHttpConnectionManager

        // N.B. HostConfiguration.equals() includes proxy settings in the compare.
        HttpClient httpClient = map.get(hc);

        if ( httpClient == null )
        {
            httpClient = new HttpClient(new SimpleHttpConnectionManager());
            httpClient.getParams().setParameter(HttpMethodParams.RETRY_HANDLER,
                    new DefaultHttpMethodRetryHandler(RETRY_COUNT, false));
            if (log.isDebugEnabled()) {
                log.debug("Created new HttpClient: @"+System.identityHashCode(httpClient));
            }
View Full Code Here

Examples of org.apache.commons.httpclient.SimpleHttpConnectionManager

        Map map = (Map) httpClients.get();
        HttpClient httpClient = (HttpClient) map.get(hc);

        if ( httpClient == null )
        {
            httpClient = new HttpClient(new SimpleHttpConnectionManager());
            if (log.isDebugEnabled()) {
                log.debug("Created new HttpClient: @"+System.identityHashCode(httpClient));
            }
            httpClient.setHostConfiguration(hc);
            map.put(hc, httpClient);
View Full Code Here

Examples of org.apache.commons.httpclient.SimpleHttpConnectionManager

                multithreaded = localThreadSceme;
                if (multithreaded) {
                    manager = new MultiThreadedHttpConnectionManager();
                } else {
                    manager = new SimpleHttpConnectionManager();
                }

                XMLConfiguration config = null;

                try {
View Full Code Here

Examples of org.apache.commons.httpclient.SimpleHttpConnectionManager

        // N.B. HostConfiguration.equals() includes proxy settings in the compare.
        HttpClient httpClient = map.get(hc);

        if ( httpClient == null )
        {
            httpClient = new HttpClient(new SimpleHttpConnectionManager());
            httpClient.getParams().setParameter(HttpMethodParams.RETRY_HANDLER,
                    new DefaultHttpMethodRetryHandler(RETRY_COUNT, false));
            if (log.isDebugEnabled()) {
                log.debug("Created new HttpClient: @"+System.identityHashCode(httpClient));
            }
View Full Code Here

Examples of org.apache.commons.httpclient.SimpleHttpConnectionManager

    try
    {
      method = createHttpMethod();
     
      // Create an instance of HttpClient.
      HttpConnectionManager manager = new SimpleHttpConnectionManager();
      HttpConnectionManagerParams params = new HttpConnectionManagerParams();
      params.setSoTimeout(HTTP_TIMEOUT_IN_MS);
      params.setConnectionTimeout(HTTP_CONNECTION_TIMEOUT_IN_MS);
      manager.setParams(params);
      HttpClient client = new HttpClient(manager);
     
      // Execute the method.      
      int statusCode = client.executeMethod(method);
     
View Full Code Here

Examples of org.apache.commons.httpclient.SimpleHttpConnectionManager

  public static HttpClient getClient() {

    int connectionTimeout = 3000;
    int pageTimeout = 7000;
    HttpConnectionManager connectionManager = new SimpleHttpConnectionManager();
    HttpConnectionManagerParams connectionParams = connectionManager.getParams();
    connectionParams.setConnectionTimeout( connectionTimeout );
    connectionParams.setSoTimeout( pageTimeout );

    HttpClient httpClient = null;
    if ( connectionManager != null ) {
View Full Code Here

Examples of org.apache.commons.httpclient.SimpleHttpConnectionManager

        Map map = (Map) httpClients.get();
    HttpClient httpClient = (HttpClient) map.get(hc);
   
    if ( httpClient == null )
    {
      httpClient = new HttpClient(new SimpleHttpConnectionManager());
      httpClient.setHostConfiguration(hc);
      map.put(hc, httpClient);
            // These items don't change, so only need to be done once
            if (useProxy) {
                if (PROXY_USER.length() > 0){
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.