Class RhinoBasedPacEvaluator

java.lang.Object
net.sourceforge.jnlp.runtime.RhinoBasedPacEvaluator
All Implemented Interfaces:
PacEvaluator

public class RhinoBasedPacEvaluator extends Object implements PacEvaluator
Represents a Proxy Auto Config file. This object can be used to evaluate the proxy file to find the proxy for a given url.
See Also:
  • Constructor Details

    • RhinoBasedPacEvaluator

      public RhinoBasedPacEvaluator(URL pacUrl)
      Initialize a new object by using the PAC file located at the given URL.
      Parameters:
      pacUrl - the url of the PAC file to use
  • Method Details

    • getProxies

      public String getProxies(URL url)
      Get the proxies for accessing a given URL. The result is obtained by evaluating the PAC file with the given url (and the host) as input. This method performs caching of the result.
      Specified by:
      getProxies in interface PacEvaluator
      Parameters:
      url - the url for which a proxy is desired
      Returns:
      a list of proxies in a string like
      "PROXY foo.example.com:8080; PROXY bar.example.com:8080; DIRECT"
      See Also:
      • getProxiesWithoutCaching(URL)