Package org.apache.commons.httpclient

Examples of org.apache.commons.httpclient.MultiThreadedHttpConnectionManager


        _bpelServer.setHydrationLazy(_odeConfig.isHydrationLazy());
        _bpelServer.setHydrationLazyMinimumSize(_odeConfig.getHydrationLazyMinimumSize());
    }

    private void initHttpConnectionManager() throws ServletException {
        httpConnectionManager = new MultiThreadedHttpConnectionManager();
        // settings may be overridden from ode-axis2.properties using the same properties as HttpClient
        // /!\ If the size of the conn pool is smaller than the size of the thread pool, the thread pool might get starved.
        int max_per_host = Integer.parseInt(_odeConfig.getProperty(HttpConnectionManagerParams.MAX_HOST_CONNECTIONS, ""+_odeConfig.getPoolMaxSize()));
        int max_total = Integer.parseInt(_odeConfig.getProperty(HttpConnectionManagerParams.MAX_TOTAL_CONNECTIONS, ""+_odeConfig.getPoolMaxSize()));
        if(__log.isDebugEnabled()) {
View Full Code Here


    Abdera abdera,
    String useragent,
    Cache cache) {
      this.abdera = abdera;
      this.cache = cache;
      MultiThreadedHttpConnectionManager connManager =
        new MultiThreadedHttpConnectionManager();
      client = new HttpClient(connManager);
      client.getParams().setParameter(
        HttpClientParams.USER_AGENT,
        useragent);
      client.getParams().setBooleanParameter(
View Full Code Here

            throws FileSystemException
    {
        HttpClient client;
        try
        {
            HttpConnectionManager mgr = new MultiThreadedHttpConnectionManager();
            HttpConnectionManagerParams connectionMgrParams = mgr.getParams();

            client = new HttpClient(mgr);

            final HostConfiguration config = new HostConfiguration();
            config.setHost(hostname, port, scheme);
View Full Code Here

  /**
   * 创建HttpClient实例,子类可以通过覆写此方法,替换实现类
   * @return HttpClient实例
   */
  protected HttpClient createHttpClient() {
    return new HttpClient(new MultiThreadedHttpConnectionManager());
  }
View Full Code Here

     
      this.name = ObjectName.getInstance(SERVER_NAME);
      this.server = this.getAdaptors()[0];
      this.baseURL = this.getHttpURLs()[0];

      this.manager = new MultiThreadedHttpConnectionManager();
     
      HttpConnectionManagerParams params = new HttpConnectionManagerParams();
      params.setDefaultMaxConnectionsPerHost(MAX_THREADS);
      params.setMaxTotalConnections(MAX_THREADS);
     
View Full Code Here

    protected void doInitialise() throws InitialisationException
    {
        super.doInitialise();
        if (clientConnectionManager == null)
        {
            clientConnectionManager = new MultiThreadedHttpConnectionManager();
            HttpConnectionManagerParams params = new HttpConnectionManagerParams();
            if (getSendBufferSize() != INT_VALUE_NOT_SET)
            {
                params.setSendBufferSize(getSendBufferSize());
            }
View Full Code Here

    @Override
  public void init(ServletConfig config) throws ServletException {
        super.init(config);
        // Create a pool of HTTP connections to use to get the favicons
        client = new HttpClient(new MultiThreadedHttpConnectionManager());
        HttpConnectionManagerParams params = client.getHttpConnectionManager().getParams();
        params.setConnectionTimeout(2000);
        params.setSoTimeout(2000);
        // Load the default favicon to use when no favicon was found of a remote host
        try {
View Full Code Here

    String passwd = System.getProperty("bpm_encryptedPasswd", "pwd");
       
    System.out.println("host : " + host + ", port : " + port + ", userId : " + userId);
   
//    httpClient = new HttpClient();
    httpClient = new HttpClient(new MultiThreadedHttpConnectionManager());
    httpClient.getHostConfiguration().setHost(host, Integer.parseInt(port), "http");
    httpClient.getParams().setCookiePolicy(CookiePolicy.BROWSER_COMPATIBILITY);

    //TODO: login mechanism for jws client
    /*    CookieSpec cookiespec = CookiePolicy.getDefaultSpec();
View Full Code Here

  public void executeActivity(ProcessInstance instance) throws Exception {

   
    HttpClient httpClient =
      httpClient = new HttpClient(new MultiThreadedHttpConnectionManager());
      httpClient.getHostConfiguration().setHost(getHost(), getPort(), getProtocol());
      httpClient.getParams().setCookiePolicy(CookiePolicy.BROWSER_COMPATIBILITY);

    HttpMethod method = new GetMethod(getUri());
View Full Code Here

    }
   
   
    private HttpClient createHttpClient() {
       
        httpConnManager = new MultiThreadedHttpConnectionManager();
        setCommonManagerParams(httpConnManager);
        return new HttpClient(httpConnManager);  
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.httpclient.MultiThreadedHttpConnectionManager

Copyright © 2018 www.massapicom. 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.