com.ansys.ingress.client.api.utils

## Class HttpProxySelector

- java.lang.Object
- - java.net.ProxySelector
  - - com.ansys.ingress.client.api.utils.HttpProxySelector

-     public class HttpProxySelector
      extends java.net.ProxySelector

  HttpProxySelector is used to obtain the proxy servers used by HTTP communications. FTP and SOCKS defer to the system default proxy selector. This code based on an example at http://docs.oracle.com/javase/7/docs/technotes/guides/net/proxies.html.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `HttpProxySelector()` Creates a new instance of EkmProxySelector.
    `HttpProxySelector(java.net.ProxySelector defaultSelector)` Creates a new instance of EkmProxySelector.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addProxy(java.lang.String url)` Adds a proxy to the selector.
    `void` | `addProxy(java.net.URL url)` Adds a proxy to the selector.
    `void` | `connectFailed(java.net.URI uri, java.net.SocketAddress sa, java.io.IOException ioe)`
    `java.util.List<java.net.Proxy>` | `select(java.net.URI uri)`

    - ### Methods inherited from class java.net.ProxySelector

      `getDefault, setDefault`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### HttpProxySelector

          public HttpProxySelector()

      Creates a new instance of EkmProxySelector.

    - #### HttpProxySelector

          public HttpProxySelector(java.net.ProxySelector defaultSelector)

      Creates a new instance of EkmProxySelector.
      Parameters:
        `defaultSelector` - the default proxy selector to use

  - ### Method Detail

    - #### connectFailed

          public void connectFailed(java.net.URI uri,
                                    java.net.SocketAddress sa,
                                    java.io.IOException ioe)

      Specified by:
        `connectFailed` in class `java.net.ProxySelector`

    - #### select

          public java.util.List<java.net.Proxy> select(java.net.URI uri)

      Specified by:
        `select` in class `java.net.ProxySelector`

    - #### addProxy

          public void addProxy(java.lang.String url)
                        throws java.net.MalformedURLException

      Adds a proxy to the selector.
      Parameters:
        `url` - the address of the proxy
      Throws:
        `java.net.MalformedURLException` - if the address is malformed

    - #### addProxy

          public void addProxy(java.net.URL url)

      Adds a proxy to the selector.
      Parameters:
        `url` - the address of the proxy