Class UrlPacScriptSource

  • All Implemented Interfaces:
    PacScriptSource

    public class UrlPacScriptSource
    extends java.lang.Object
    implements PacScriptSource
    Script source that will load the content of a PAC file from an webserver. The script content is cached once it was downloaded.
    • Constructor Summary

      Constructors 
      Constructor Description
      UrlPacScriptSource​(java.lang.String url)
      Constructor
    • Constructor Detail

      • UrlPacScriptSource

        public UrlPacScriptSource​(java.lang.String url)
        Constructor
        Parameters:
        url - the URL to download the script from.
    • Method Detail

      • getScriptContent

        public java.lang.String getScriptContent()
                                          throws java.io.IOException
        getScriptContent
        Specified by:
        getScriptContent in interface PacScriptSource
        Returns:
        a script.
        Throws:
        java.io.IOException - on read error.
        See Also:
        com.btr.proxy.selector.pac.PacScriptSource#getScriptContent()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()
      • isScriptValid

        public boolean isScriptValid()
        isScriptValid
        Specified by:
        isScriptValid in interface PacScriptSource
        Returns:
        true if everything is fine, else false.