public class PacScriptEvaluatorNoProxy extends Object implements PacScriptEvaluator
NO_PROXY
.Constructor and Description |
---|
PacScriptEvaluatorNoProxy() |
Modifier and Type | Method and Description |
---|---|
List<Proxy> |
findProxyForURL(URI u)
Returns the proxy/proxies appropriate to use for the given URI.
|
String |
getEngineInfo()
Gets relevant information about the engine, typically the name
of the JavaScript engine, version number, etc.
|
String |
getJsEntryFunction()
Gets the entry function to the PAC script which the engine uses.
|
String |
getPacScriptSource()
Gets the JavaScript source code of the PAC script.
|
boolean |
usesCaching()
Returns if the Evaluator uses result caching or not.
|
public List<Proxy> findProxyForURL(URI u)
PacScriptEvaluator
The method calls the JavaScript FindProxyForURL(url, host)
function in the PAC script (or alternatively the
FindProxyForURLEx(url, host)
function), parses the result and
returns it as a prioritized list of proxies.
findProxyForURL
in interface PacScriptEvaluator
u
- URI to get proxies for.public boolean usesCaching()
PacScriptEvaluator
PacScriptEvaluator.findProxyForURL(java.net.URI)
will
not result in a call to JavaScript function FindProxyForURL
if the URL has been resolved previously. But the Evaluator cannot use
caching if the PAC Script uses methods which depends on time and the Evaluator
may therefore have decided to turn off result caching.
If an implementation of PacScriptEvaluator
never uses result caching
(because it simply isn't implemented) then this method will always return
false
.
usesCaching
in interface PacScriptEvaluator
public String getJsEntryFunction()
PacScriptEvaluator
getJsEntryFunction
in interface PacScriptEvaluator
public String getEngineInfo()
PacScriptEvaluator
getEngineInfo
in interface PacScriptEvaluator
public String getPacScriptSource()
PacScriptEvaluator
getPacScriptSource
in interface PacScriptEvaluator