public class

ProxySetup

extends Object
java.lang.Object
   ↳ com.esri.core.io.ProxySetup

Class Overview

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.

Summary

Public Constructors
ProxySetup()
Public Methods
static void setupProxy(String proxyUrl, UserCredentials proxyCredentials)
Setup proxy authentication for proxy access set up on the JVM command line.
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, UserCredentials proxyCredentials)
Setup proxy server access through the given host and port using the given user credentials for authorisation.
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.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ProxySetup ()

Public Methods

public static void setupProxy (String proxyUrl, UserCredentials proxyCredentials)

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

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

public static void setupProxy (String proxyHost, int proxyPort)

Setup proxy server access through the given host and port.

Parameters
proxyHost String: the proxy host name or IP address
proxyPort int: the proxy port

public static void setupProxy (String proxyHost, int proxyPort, String scheme)

Setup proxy server access through the given host, port and scheme.

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

public 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.

Parameters
proxyHost String: the proxy host name or IP address
proxyPort int: the proxy port
proxyCredentials UserCredentials: the proxy credentials
Throws
EsriSecurityException the security exception

public 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.

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