Class CommonWindowsSearchStrategy
- java.lang.Object
-
- com.github.markusbernhardt.proxy.search.desktop.win.CommonWindowsSearchStrategy
-
- All Implemented Interfaces:
ProxySearchStrategy
- Direct Known Subclasses:
IEProxySearchStrategy
,WinProxySearchStrategy
public abstract class CommonWindowsSearchStrategy extends java.lang.Object implements ProxySearchStrategy
Contains common methods used in search strategies for both Windows and IE.
-
-
Constructor Summary
Constructors Constructor Description CommonWindowsSearchStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addFallbackSelector(java.util.Properties settings, ProtocolDispatchSelector ps)
Installs a fallback selector that is used whenever no protocol specific selector is defined.private void
addSelectorForProtocol(java.util.Properties settings, java.lang.String protocol, ProtocolDispatchSelector ps)
Creates a selector for a given protocol.private ProxyBypassListSelector
buildLocalBypassSelector(ProtocolDispatchSelector ps)
Wraps the given selector to handle "local" addressesprotected ProtocolDispatchSelector
buildProtocolDispatchSelector(java.util.Properties properties)
protected java.util.Properties
parseProxyList(java.lang.String proxyString)
Parses the proxy list and splits it by protocol.protected java.net.ProxySelector
setByPassListOnSelector(java.lang.String bypassList, ProtocolDispatchSelector ps)
Installs the proxy exclude list on the given selector.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.github.markusbernhardt.proxy.ProxySearchStrategy
getName, getProxySelector
-
-
-
-
Method Detail
-
setByPassListOnSelector
protected java.net.ProxySelector setByPassListOnSelector(java.lang.String bypassList, ProtocolDispatchSelector ps)
Installs the proxy exclude list on the given selector.- Parameters:
bypassList
- the list of urls / hostnames to ignore.ps
- the proxy selector to wrap.- Returns:
- a wrapped proxy selector that will handle the bypass list.
-
buildLocalBypassSelector
private ProxyBypassListSelector buildLocalBypassSelector(ProtocolDispatchSelector ps)
Wraps the given selector to handle "local" addresses- Parameters:
ps
- the proxy selector to wrap.- Returns:
- a wrapped proxy selector that will handle the local addresses.
-
addFallbackSelector
private void addFallbackSelector(java.util.Properties settings, ProtocolDispatchSelector ps)
Installs a fallback selector that is used whenever no protocol specific selector is defined.- Parameters:
settings
- to take the proxy settings from.ps
- to install the created selector on.
-
addSelectorForProtocol
private void addSelectorForProtocol(java.util.Properties settings, java.lang.String protocol, ProtocolDispatchSelector ps)
Creates a selector for a given protocol. The proxy will be taken from the settings and installed on the dispatch selector.- Parameters:
settings
- to take the proxy settings from.protocol
- to create a selector for.ps
- to install the created selector on.
-
parseProxyList
protected java.util.Properties parseProxyList(java.lang.String proxyString) throws ProxyException
Parses the proxy list and splits it by protocol.- Parameters:
proxyString
- the proxy list string- Returns:
- Properties with separated settings.
- Throws:
ProxyException
- on parse error.
-
buildProtocolDispatchSelector
protected ProtocolDispatchSelector buildProtocolDispatchSelector(java.util.Properties properties)
-
-