summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/btr/proxy/selector/pac/PacScriptParser.java
diff options
context:
space:
mode:
authorBjörn Hagemeister2014-11-11 14:40:18 +0100
committerBjörn Hagemeister2014-11-11 14:40:18 +0100
commite70ee5b59306ea37dd0c72603c61b33b1555def9 (patch)
treee6f09d76449da54463b9b4fa408b7dfba4b4b7bf /src/main/java/com/btr/proxy/selector/pac/PacScriptParser.java
downloadproxy-vole-e70ee5b59306ea37dd0c72603c61b33b1555def9.tar.gz
proxy-vole-e70ee5b59306ea37dd0c72603c61b33b1555def9.tar.xz
proxy-vole-e70ee5b59306ea37dd0c72603c61b33b1555def9.zip
Added proxy java classes.
Diffstat (limited to 'src/main/java/com/btr/proxy/selector/pac/PacScriptParser.java')
-rw-r--r--src/main/java/com/btr/proxy/selector/pac/PacScriptParser.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/main/java/com/btr/proxy/selector/pac/PacScriptParser.java b/src/main/java/com/btr/proxy/selector/pac/PacScriptParser.java
new file mode 100644
index 0000000..5e7fd73
--- /dev/null
+++ b/src/main/java/com/btr/proxy/selector/pac/PacScriptParser.java
@@ -0,0 +1,29 @@
+package com.btr.proxy.selector.pac;
+
+/***************************************************************************
+ * Common interface for PAC script parsers.
+ *
+ * @author Bernd Rosstauscher (proxyvole@rosstauscher.de) Copyright 2009
+ ***************************************************************************/
+public interface PacScriptParser {
+
+ /***************************************************************************
+ * Gets the source of the PAC script used by this parser.
+ *
+ * @return a PacScriptSource.
+ **************************************************************************/
+ public PacScriptSource getScriptSource();
+
+ /*************************************************************************
+ * Evaluates the given URL and host against the PAC script.
+ *
+ * @param url
+ * the URL to evaluate.
+ * @param host
+ * the host name part of the URL.
+ * @return the script result.
+ * @throws ProxyEvaluationException
+ * on execution error.
+ ************************************************************************/
+ public String evaluate(String url, String host) throws ProxyEvaluationException;
+}