Package org.sonar.wsclient

Examples of org.sonar.wsclient.Host


    }
    return sonar;
  }

  private Host createHost() {
    Host host;
    final String safeHostUrl = getHostSafe(mySonarServerConfig.getHostUrl());
    if (mySonarServerConfig.isAnonymous()) {
      host = new Host(safeHostUrl);
    } else {
      mySonarServerConfig.loadPassword();
      host = new Host(safeHostUrl, mySonarServerConfig.getUser(), mySonarServerConfig.getPassword());
      mySonarServerConfig.clearPassword();
    }
    return host;
  }
View Full Code Here


     * @param password (optional) password to access sonar
     * @param useProxy flag to indicate whether IDEA's proxy settings shall be used to connect to Sonar
     * @return a connection to Sonar
     */
    public static Sonar getSonar(String host, String user, String password, boolean useProxy) {
        Host hostServer = new Host(fixHostName(host));
        // 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) {
View Full Code Here

TOP

Related Classes of org.sonar.wsclient.Host

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.