public class ProxySearch extends Object implements ProxySearchStrategy
addStrategy to add one or more search strategies.getProxySelector method.
Invoke the static getDefaultProxySearch method to use a default
search strategy.
| Modifier and Type | Class and Description |
|---|---|
static class |
ProxySearch.Strategy
Types of proxy detection supported by the builder.
|
| Constructor and Description |
|---|
ProxySearch()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addStrategy(ProxySearch.Strategy strategy)
Adds an search strategy to the list of proxy searches strategies.
|
static ProxySearch |
getDefaultProxySearch()
Sets up a ProxySearch that uses a default search strategy suitable for
every platform.
|
String |
getName()
Gets the printable name of the search strategy.
|
ProxySelector |
getProxySelector()
Gets the proxy selector that will use the configured search order.
|
static void |
main(String[] args)
For testing only.
|
void |
setPacCacheSettings(int size,
long ttl,
BufferedProxySelector.CacheScope cacheScope)
Sets the cache size of the PAC proxy selector cache.
|
String |
toString()
toString
|
public static ProxySearch getDefaultProxySearch()
public void addStrategy(ProxySearch.Strategy strategy)
strategy - the search strategy to add.public void setPacCacheSettings(int size,
long ttl,
BufferedProxySelector.CacheScope cacheScope)
size - of the cache. Set it to 0 to disable caching.ttl - is the time to live of the cache entries as amount of
milliseconds.cacheScope - the desired cache scope.public ProxySelector getProxySelector()
getProxySelector in interface ProxySearchStrategypublic String getName()
getName in interface ProxySearchStrategypublic String toString()
toString in class ObjectObject.toString()public static void main(String[] args)
args - the command line arguments.Copyright © 2020. All rights reserved.