Package org.apache.http.impl.client

Examples of org.apache.http.impl.client.DefaultRedirectStrategy


            return false;
          }
      
        });

      localHttpClient.setRedirectStrategy(new DefaultRedirectStrategy());
      // Set up authentication to use
      if (ingestNtlmDomain != null)
      {
        localHttpClient.getCredentialsProvider().setCredentials(AuthScope.ANY,
          new NTCredentials(ingestNtlmUsername,ingestNtlmPassword,currentHost,ingestNtlmDomain));
View Full Code Here


          {
            return false;
          }
      
        });
      localHttpClient.setRedirectStrategy(new DefaultRedirectStrategy());
      if (strippedUserName != null)
      {
        localHttpClient.getCredentialsProvider().setCredentials(
          new AuthScope(serverName,serverPort),
          new NTCredentials(strippedUserName, password, currentHost, ntlmDomain));
View Full Code Here

        params.setBooleanParameter(CoreConnectionPNames.TCP_NODELAY,true);
        params.setBooleanParameter(CoreConnectionPNames.STALE_CONNECTION_CHECK,false);
        params.setIntParameter(CoreConnectionPNames.SO_TIMEOUT,socketTimeOut);
        params.setIntParameter(CoreConnectionPNames.CONNECTION_TIMEOUT,connectionTimeOut);
        client = new DefaultHttpClient(httpConnectionManager,params);
        client.setRedirectStrategy(new DefaultRedirectStrategy());
        core.addCloseHook(new CloseHandler());
      }
    }
  }
View Full Code Here

    params.setBooleanParameter(CoreConnectionPNames.TCP_NODELAY,true);
    params.setBooleanParameter(CoreConnectionPNames.STALE_CONNECTION_CHECK,false);
    params.setIntParameter(CoreConnectionPNames.SO_TIMEOUT,socketTimeOut);
    params.setIntParameter(CoreConnectionPNames.CONNECTION_TIMEOUT,connectionTimeOut);
    client = new DefaultHttpClient(httpConnectionManager,params);
    client.setRedirectStrategy(new DefaultRedirectStrategy());
  }
View Full Code Here

        {
          return false;
        }
      
      });
    localHttpClient.setRedirectStrategy(new DefaultRedirectStrategy());
    if (clientId != null)
    {
      localHttpClient.getCredentialsProvider().setCredentials(
        AuthScope.ANY,
        new UsernamePasswordCredentials(clientId,clientSecret));
View Full Code Here

            return false;
          }
      
        });

      localHttpClient.setRedirectStrategy(new DefaultRedirectStrategy());
      // Set up authentication to use
      if (ingestNtlmDomain != null)
      {
        localHttpClient.getCredentialsProvider().setCredentials(AuthScope.ANY,
          new NTCredentials(ingestNtlmUsername,ingestNtlmPassword,currentHost,ingestNtlmDomain));
View Full Code Here

        BasicHttpParams params = new BasicHttpParams();
        params.setBooleanParameter(CoreConnectionPNames.TCP_NODELAY,true);
        params.setBooleanParameter(CoreConnectionPNames.STALE_CONNECTION_CHECK,false);
        //params.setIntParameter(CoreConnectionPNames.SO_TIMEOUT,socketTimeOut);
        DefaultHttpClient localHttpClient = new DefaultHttpClient(connectionManager,params);
        localHttpClient.setRedirectStrategy(new DefaultRedirectStrategy());
        httpClient = localHttpClient;
      }
    }
    return httpClient;
  }
View Full Code Here

            return false;
          }
      
        });

      localHttpClient.setRedirectStrategy(new DefaultRedirectStrategy());
      // Set up authentication to use
      if (ntlmDomain != null)
      {
        localHttpClient.getCredentialsProvider().setCredentials(AuthScope.ANY,
          new NTCredentials(ntlmUsername,ntlmPassword,currentHost,ntlmDomain));
View Full Code Here

    return false;
  }
    
      });

    localDmwsHttpClient.setRedirectStrategy(new DefaultRedirectStrategy());
    if (domainUser != null)
    {
      localDmwsHttpClient.getCredentialsProvider().setCredentials(
        new AuthScope(meridioDmwsUrl.getHost(),meridioDmwsUrl.getPort()),
        new NTCredentials(domainUser, password, currentHost, domain));
    }
    // Initialize proxy
    if (dmwsProxyHost != null && dmwsProxyHost.length() > 0)
    {
      int port = (dmwsProxyPort == null || dmwsProxyPort.length() == 0)?8080:Integer.parseInt(dmwsProxyPort);
      // Configure proxy authentication
      if (domainUser != null && domainUser.length() > 0)
      {
        localDmwsHttpClient.getCredentialsProvider().setCredentials(
          new AuthScope(dmwsProxyHost, port),
          new NTCredentials(domainUser, password, currentHost, domain));
      }

      HttpHost proxy = new HttpHost(dmwsProxyHost, port);
      localDmwsHttpClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
    }
    dmwsHttpClient = localDmwsHttpClient;
   
    // rmws
    BasicHttpParams rmwsParams = new BasicHttpParams();
    rmwsParams.setBooleanParameter(CoreConnectionPNames.TCP_NODELAY,true);
    rmwsParams.setBooleanParameter(CoreConnectionPNames.STALE_CONNECTION_CHECK,false);
    rmwsParams.setIntParameter(CoreConnectionPNames.SO_TIMEOUT,900000);
    rmwsParams.setBooleanParameter(ClientPNames.ALLOW_CIRCULAR_REDIRECTS,true);
    DefaultHttpClient localRmwsHttpClient = new DefaultHttpClient(connectionManager,rmwsParams);
    // No retries
    localRmwsHttpClient.setHttpRequestRetryHandler(new HttpRequestRetryHandler()
      {
  public boolean retryRequest(
    IOException exception,
    int executionCount,
          HttpContext context)
  {
    return false;
  }
    
      });

    localRmwsHttpClient.setRedirectStrategy(new DefaultRedirectStrategy());
    if (domainUser != null)
    {
      localRmwsHttpClient.getCredentialsProvider().setCredentials(
        new AuthScope(meridioRmwsUrl.getHost(),meridioRmwsUrl.getPort()),
        new NTCredentials(domainUser, password, currentHost, domain));
    }
    // Initialize proxy
    if (rmwsProxyHost != null && rmwsProxyHost.length() > 0)
    {
      int port = (rmwsProxyPort == null || rmwsProxyPort.length() == 0)?8080:Integer.parseInt(rmwsProxyPort);
      // Configure proxy authentication
      if (domainUser != null && domainUser.length() > 0)
      {
        localRmwsHttpClient.getCredentialsProvider().setCredentials(
          new AuthScope(rmwsProxyHost, port),
          new NTCredentials(domainUser, password, currentHost, domain));
      }

      HttpHost proxy = new HttpHost(rmwsProxyHost, port);
      localRmwsHttpClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
    }
    rmwsHttpClient = localRmwsHttpClient;

    // mcws
    if (meridioManifoldCFWSUrl != null)
    {
      BasicHttpParams mcwsParams = new BasicHttpParams();
      mcwsParams.setBooleanParameter(CoreConnectionPNames.TCP_NODELAY,true);
      mcwsParams.setBooleanParameter(CoreConnectionPNames.STALE_CONNECTION_CHECK,false);
      mcwsParams.setIntParameter(CoreConnectionPNames.SO_TIMEOUT,900000);
      mcwsParams.setBooleanParameter(ClientPNames.ALLOW_CIRCULAR_REDIRECTS,true);
      DefaultHttpClient localMcwsHttpClient = new DefaultHttpClient(connectionManager,mcwsParams);
      // No retries
      localMcwsHttpClient.setHttpRequestRetryHandler(new HttpRequestRetryHandler()
        {
          public boolean retryRequest(
            IOException exception,
            int executionCount,
            HttpContext context)
          {
            return false;
          }
      
        });

      localMcwsHttpClient.setRedirectStrategy(new DefaultRedirectStrategy());
      if (domainUser != null)
      {
        localMcwsHttpClient.getCredentialsProvider().setCredentials(
          new AuthScope(meridioManifoldCFWSUrl.getHost(),meridioManifoldCFWSUrl.getPort()),
          new NTCredentials(domainUser, password, currentHost, domain));
View Full Code Here

          {
            return false;
          }
      
        });
      localHttpClient.setRedirectStrategy(new DefaultRedirectStrategy());
      if (strippedUserName != null)
      {
        localHttpClient.getCredentialsProvider().setCredentials(
          new AuthScope(serverName,serverPort),
          new NTCredentials(strippedUserName, password, currentHost, ntlmDomain));
View Full Code Here

TOP

Related Classes of org.apache.http.impl.client.DefaultRedirectStrategy

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.