Package org.sonar.wsclient.connectors

Examples of org.sonar.wsclient.connectors.HttpClient4Connector


        // use credentials for Sonar in case they are specified
        if (user != null && password != null) {
            hostServer.setUsername(user);
            hostServer.setPassword(password);
        }
        final HttpClient4Connector connector = new HttpClient4Connector(hostServer);
        // check whether IDEA has a proxy set
        HttpConfigurable proxySettings = HttpConfigurable.getInstance();
        if (useProxy && proxySettings.USE_HTTP_PROXY) {
            DefaultHttpClient httpClient = connector.getHttpClient();
            // set proxy authentication if needed
            if (proxySettings.PROXY_AUTHENTICATION) {
                AuthScope authScope = new AuthScope(proxySettings.PROXY_HOST, proxySettings.PROXY_PORT);
                UsernamePasswordCredentials proxyCredentials = new UsernamePasswordCredentials(
                        proxySettings.PROXY_LOGIN, proxySettings.getPlainProxyPassword());
View Full Code Here


    tester.addServlet(BadRulesServlet.class, "/api/rules");
    baseUrl = tester.createSocketConnector(true);
    tester.start();

    return Arrays.asList(new Object[][] {
      {new Sonar(new HttpClient4Connector(new Host(baseUrl)))},
      {new Sonar(new HttpClient3Connector(new Host(baseUrl)))}
    });
  }
View Full Code Here

TOP

Related Classes of org.sonar.wsclient.connectors.HttpClient4Connector

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.