Package org.sonatype.nexus.client.rest

Examples of org.sonatype.nexus.client.rest.ProxyInfo


    }
  }

  protected void applyProxyIfAny(final ConnectionInfo connectionInfo, ApacheHttpClient4Config config) {
    if (connectionInfo.getProxyInfos().size() > 0) {
      final ProxyInfo proxyInfo = connectionInfo.getProxyInfos().get(connectionInfo.getBaseUrl().getProtocol());
      if (proxyInfo != null) {
        config.getProperties().put(
            PROPERTY_PROXY_URI, "http://" + proxyInfo.getProxyHost() + ":" + proxyInfo.getProxyPort()
        );

        if (proxyInfo.getProxyAuthentication() != null) {
          if (proxyInfo.getProxyAuthentication() instanceof UsernamePasswordAuthenticationInfo) {
            final UsernamePasswordAuthenticationInfo upinfo =
                (UsernamePasswordAuthenticationInfo) connectionInfo.getAuthenticationInfo();
            config.getProperties().put(PROPERTY_PROXY_USERNAME, upinfo.getUsername());
            config.getProperties().put(PROPERTY_PROXY_PASSWORD, upinfo.getPassword());
          }
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.client.rest.ProxyInfo

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.