com.esri.core.io
Class ProxySetup

java.lang.Object
  extended by com.esri.core.io.ProxySetup

public class ProxySetup
extends Object

This class is used to configure network access through a proxy server and allows you to set the host name, port and any authentication that may be required. It is still possible to set the host and port using JVM parameters (-DhttpProxy.Host=<host name or ip> -DhttpProxy.Port=<port>) but using this class will override the JVM's settings. Various static methods are provided to allow the host, port, scheme (eg. http, https) and authentication to be set up. A method is also provided for setting authentication on a server set up on the JVM's command line.

Since:
10.1.1

Constructor Summary
ProxySetup()
           
 
Method Summary
static void setupProxy(String proxyHost, int proxyPort)
          Setup proxy server access through the given host and port.
static void setupProxy(String proxyHost, int proxyPort, String scheme)
          Setup proxy server access through the given host, port and scheme.
static void setupProxy(String proxyHost, int proxyPort, String scheme, UserCredentials proxyCredentials)
          Setup proxy server access through the given host, port and scheme using the given user credentials for authorisation.
static void setupProxy(String proxyHost, int proxyPort, UserCredentials proxyCredentials)
          Setup proxy server access through the given host and port using the given user credentials for authorisation.
static void setupProxy(String proxyUrl, UserCredentials proxyCredentials)
          Setup proxy authentication for proxy access set up on the JVM command line.
static void setupProxyAuthentication(String proxyUrl, UserCredentials proxyCredentials)
          Deprecated. setupProxy(String, UserCredentials) instead.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxySetup

public ProxySetup()
Method Detail

setupProxy

public static void setupProxy(String proxyHost,
                              int proxyPort)
Setup proxy server access through the given host and port.

Parameters:
proxyHost - the proxy host name or IP address
proxyPort - the proxy port
Since:
10.1.1

setupProxy

public static void setupProxy(String proxyHost,
                              int proxyPort,
                              String scheme)
Setup proxy server access through the given host, port and scheme.

Parameters:
proxyHost - the proxy host name or IP address
proxyPort - the proxy port
scheme - the scheme (eg. http, https)
Since:
10.1.1

setupProxy

public static void setupProxy(String proxyHost,
                              int proxyPort,
                              UserCredentials proxyCredentials)
                       throws EsriSecurityException
Setup proxy server access through the given host and port using the given user credentials for authorisation.

Parameters:
proxyHost - the proxy host name or IP address
proxyPort - the proxy port
proxyCredentials - the proxy credentials
Throws:
EsriSecurityException - the security exception
Since:
10.1.1

setupProxy

public static void setupProxy(String proxyHost,
                              int proxyPort,
                              String scheme,
                              UserCredentials proxyCredentials)
                       throws EsriSecurityException
Setup proxy server access through the given host, port and scheme using the given user credentials for authorisation.

Parameters:
proxyHost - the proxy host name or IP address
proxyPort - the proxy port
scheme - the scheme (eg. http, https)
proxyCredentials - the proxy credentials
Throws:
EsriSecurityException - the esri security exception
Since:
10.1.1

setupProxyAuthentication

public static void setupProxyAuthentication(String proxyUrl,
                                            UserCredentials proxyCredentials)
                                     throws EsriSecurityException
Deprecated. setupProxy(String, UserCredentials) instead.

Setup proxy authentication for proxy access set up on the JVM command line.

Parameters:
proxyUrl - the proxy url; this should be the full url including scheme, host name and port (<scheme>://<hostname>:<port>)
proxyCredentials - the proxy credentials
Throws:
EsriSecurityException - the esri security exception
Since:
10.1.1

setupProxy

public static void setupProxy(String proxyUrl,
                              UserCredentials proxyCredentials)
                       throws EsriSecurityException
Setup proxy authentication for proxy access set up on the JVM command line.

Parameters:
proxyUrl - the proxy url; this should be the full url including scheme, host name and port (<scheme>://<hostname>:<port>)
proxyCredentials - the proxy credentials
Throws:
EsriSecurityException - the esri security exception
Since:
10.1.1


Copyright © 2012. All Rights Reserved.