Package com.microstrategy.utils.proxy
Class JavaxPacScriptParser
- java.lang.Object
-
- com.microstrategy.utils.proxy.JavaxPacScriptParser
-
- All Implemented Interfaces:
PacScriptParser
public class JavaxPacScriptParser extends java.lang.Object implements PacScriptParser
PAC parser using the Rhino JavaScript engine bundled with Java 1.6
-
-
Constructor Summary
Constructors Constructor Description JavaxPacScriptParser(PacScriptSource source)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
evaluate(java.lang.String url, java.lang.String host)
Evaluates the given URL and host against the PAC script.PacScriptSource
getScriptSource()
Gets the source of the PAC script used by this parser.
-
-
-
Constructor Detail
-
JavaxPacScriptParser
public JavaxPacScriptParser(PacScriptSource source) throws java.lang.Exception
Constructor- Parameters:
source
- the source for the PAC script.- Throws:
java.lang.Exception
- on error.
-
-
Method Detail
-
getScriptSource
public PacScriptSource getScriptSource()
Gets the source of the PAC script used by this parser.- Specified by:
getScriptSource
in interfacePacScriptParser
- Returns:
- a PacScriptSource.
-
evaluate
public java.lang.String evaluate(java.lang.String url, java.lang.String host) throws java.lang.Exception
Evaluates the given URL and host against the PAC script.- Specified by:
evaluate
in interfacePacScriptParser
- Parameters:
url
- the URL to evaluate.host
- the host name part of the URL.- Returns:
- the script result.
- Throws:
java.lang.Exception
- on execution error.
-
-