View Javadoc

1   package com.atlassian.httpclient.apache.httpcomponents.proxy;
2   
3   import com.atlassian.httpclient.api.factory.Scheme;
4   import com.google.common.collect.ImmutableList;
5   import com.google.common.collect.Lists;
6   
7   import static com.atlassian.httpclient.api.factory.Scheme.HTTP;
8   import static com.atlassian.httpclient.api.factory.Scheme.HTTPS;
9   
10  public class ProxyTestUtils {
11      public static String[] getProxyPropertiesNames() {
12          final ImmutableList.Builder<String> builder = ImmutableList.builder();
13          for (Scheme scheme : Lists.newArrayList(HTTP, HTTPS)) {
14              for (String property : Lists.newArrayList("nonProxyHosts", "proxyHost", "proxyPort", "proxyUser", "proxyPassword")) {
15                  builder.add(scheme.schemeName() + "." + property);
16              }
17          }
18          return builder.build().toArray(new String[8]);
19      }
20  }