Class ProxyUtil


  • public class ProxyUtil
    extends java.lang.Object
    Small helper class for some common utility methods.
    • Constructor Summary

      Constructors 
      Constructor Description
      ProxyUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static PacProxySelector buildPacSelectorForUrl​(java.lang.String url)
      Build a PAC proxy selector for the given URL.
      static java.util.List<java.net.Proxy> noProxyList()
      Gets an unmodifiable proxy list that will have as it's only entry an DIRECT proxy.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ProxyUtil

        public ProxyUtil()
    • Method Detail

      • noProxyList

        public static java.util.List<java.net.Proxy> noProxyList()
        Gets an unmodifiable proxy list that will have as it's only entry an DIRECT proxy.
        Returns:
        a list with a DIRECT proxy in it.
      • buildPacSelectorForUrl

        public static PacProxySelector buildPacSelectorForUrl​(java.lang.String url)
        Build a PAC proxy selector for the given URL.
        Parameters:
        url - to fetch the PAC script from.
        Returns:
        a PacProxySelector or null if it is not possible to build a working selector.