Class JNLPProxySelector


  • public abstract class JNLPProxySelector
    extends java.net.ProxySelector
    A ProxySelector specific to JNLPs. This proxy uses the deployment configuration to determine what to do.
    See Also:
    ProxySelector
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void connectFailed​(java.net.URI uri, java.net.SocketAddress sa, java.io.IOException ioe)
      protected static java.util.List<java.net.Proxy> getFromArguments​(java.net.URI uri, boolean sameProxy, boolean sameProxyIncludesSocket, java.lang.String proxyHttpsHost, int proxyHttpsPort, java.lang.String proxyHttpHost, int proxyHttpPort, java.lang.String proxyFtpHost, int proxyFtpPort, java.lang.String proxySocks4Host, int proxySocks4Port)
      Returns a list of proxies by using the arguments
      protected abstract java.util.List<java.net.Proxy> getFromBrowser​(java.net.URI uri)
      Returns a list of proxies by querying the browser
      protected java.util.List<java.net.Proxy> getFromPAC​(java.net.URI uri)
      Returns a list of proxies by using the Proxy Auto Config (PAC) file.
      static java.util.List<java.net.Proxy> getProxiesFromPacResult​(java.lang.String pacString)
      Converts a proxy string from a browser into a List of Proxy objects suitable for java.
      java.util.List<java.net.Proxy> select​(java.net.URI uri)
      • Methods inherited from class java.net.ProxySelector

        getDefault, of, setDefault
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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
        Returns:
        list of proxies on URI
      • getFromArguments

        protected static java.util.List<java.net.Proxy> getFromArguments​(java.net.URI uri,
                                                                         boolean sameProxy,
                                                                         boolean sameProxyIncludesSocket,
                                                                         java.lang.String proxyHttpsHost,
                                                                         int proxyHttpsPort,
                                                                         java.lang.String proxyHttpHost,
                                                                         int proxyHttpPort,
                                                                         java.lang.String proxyFtpHost,
                                                                         int proxyFtpPort,
                                                                         java.lang.String proxySocks4Host,
                                                                         int proxySocks4Port)
        Returns a list of proxies by using the arguments
        Parameters:
        uri - name and code says it all
        sameProxy - name and code says it all
        sameProxyIncludesSocket - name and code says it all
        proxyHttpsHost - name and code says it all
        proxyHttpsPort - name and code says it all
        proxyHttpHost - name and code says it all
        proxyHttpPort - name and code says it all
        proxyFtpHost - name and code says it all
        proxyFtpPort - name and code says it all
        proxySocks4Host - name and code says it all
        proxySocks4Port - name and code says it all
        Returns:
        a List of Proxy objects
      • getFromPAC

        protected java.util.List<java.net.Proxy> getFromPAC​(java.net.URI uri)
        Returns a list of proxies by using the Proxy Auto Config (PAC) file. See http://en.wikipedia.org/wiki/Proxy_auto-config#The_PAC_file for more information.
        Parameters:
        uri - uri to PAC
        Returns:
        a List of valid Proxy objects
      • getFromBrowser

        protected abstract java.util.List<java.net.Proxy> getFromBrowser​(java.net.URI uri)
        Returns a list of proxies by querying the browser
        Parameters:
        uri - the uri to get proxies for
        Returns:
        a list of proxies
      • getProxiesFromPacResult

        public static java.util.List<java.net.Proxy> getProxiesFromPacResult​(java.lang.String pacString)
        Converts a proxy string from a browser into a List of Proxy objects suitable for java.
        Parameters:
        pacString - a string indicating proxies. For example "PROXY foo.bar:3128; DIRECT"
        Returns:
        a list of Proxy objects representing the parsed string. In case of malformed input, an empty list may be returned