Package com.biglybt.core.proxy.impl
Class AEProxySelectorImpl
- java.lang.Object
-
- java.net.ProxySelector
-
- com.biglybt.core.proxy.impl.AEProxySelectorImpl
-
- All Implemented Interfaces:
AEProxySelector
public class AEProxySelectorImpl extends java.net.ProxySelector implements AEProxySelector
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
AEProxySelectorImpl.ActiveProxy
private static class
AEProxySelectorImpl.MyProxy
-
Field Summary
Fields Modifier and Type Field Description private AEProxySelectorImpl.ActiveProxy
active_proxy
private java.util.List<java.lang.String>
alt_dns_servers
private java.net.ProxySelector
existing_selector
private CopyOnWriteMap<java.lang.String,java.util.List<java.net.Proxy>>
explicit_proxy_map
private static boolean
LOG
private static java.lang.String
NL
private static java.util.List<java.net.Proxy>
no_proxy_list
private static AEProxySelectorImpl
singleton
private static java.lang.ThreadLocal<java.lang.Integer>
tls
-
Constructor Summary
Constructors Modifier Constructor Description private
AEProxySelectorImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
connectFailed(java.net.Proxy proxy, java.lang.Throwable error)
private void
connectFailed(java.net.SocketAddress sa, java.lang.Throwable error)
void
connectFailed(java.net.URI uri, java.net.SocketAddress sa, java.io.IOException ioe)
void
endNoProxy()
java.net.Proxy
getActiveProxy()
int
getConnectionCount()
int
getFailCount()
java.lang.String
getInfo()
long
getLastConnectionTime()
long
getLastFailTime()
static AEProxySelector
getSingleton()
java.net.Proxy
getSOCKSProxy(java.lang.String host, int port, java.net.InetSocketAddress target)
java.net.Proxy
getSOCKSProxy(java.net.InetSocketAddress isa, java.net.InetSocketAddress target)
java.net.Proxy
removeProxy(java.net.InetSocketAddress address)
java.util.List<java.net.Proxy>
select(java.net.URI uri)
private java.util.List<java.net.Proxy>
selectSupport(java.net.URI uri)
java.net.Proxy
setProxy(java.net.InetSocketAddress address, java.net.Proxy proxy)
void
startNoProxy()
-
-
-
Field Detail
-
LOG
private static final boolean LOG
- See Also:
- Constant Field Values
-
NL
private static final java.lang.String NL
- See Also:
- Constant Field Values
-
singleton
private static final AEProxySelectorImpl singleton
-
no_proxy_list
private static final java.util.List<java.net.Proxy> no_proxy_list
-
tls
private static final java.lang.ThreadLocal<java.lang.Integer> tls
-
existing_selector
private final java.net.ProxySelector existing_selector
-
active_proxy
private volatile AEProxySelectorImpl.ActiveProxy active_proxy
-
alt_dns_servers
private volatile java.util.List<java.lang.String> alt_dns_servers
-
explicit_proxy_map
private final CopyOnWriteMap<java.lang.String,java.util.List<java.net.Proxy>> explicit_proxy_map
-
-
Method Detail
-
getSingleton
public static AEProxySelector getSingleton()
-
startNoProxy
public void startNoProxy()
- Specified by:
startNoProxy
in interfaceAEProxySelector
-
endNoProxy
public void endNoProxy()
- Specified by:
endNoProxy
in interfaceAEProxySelector
-
setProxy
public java.net.Proxy setProxy(java.net.InetSocketAddress address, java.net.Proxy proxy)
- Specified by:
setProxy
in interfaceAEProxySelector
-
removeProxy
public java.net.Proxy removeProxy(java.net.InetSocketAddress address)
- Specified by:
removeProxy
in interfaceAEProxySelector
-
select
public java.util.List<java.net.Proxy> select(java.net.URI uri)
- Specified by:
select
in classjava.net.ProxySelector
-
selectSupport
private java.util.List<java.net.Proxy> selectSupport(java.net.URI uri)
-
connectFailed
private void connectFailed(java.net.SocketAddress sa, java.lang.Throwable error)
-
connectFailed
public void connectFailed(java.net.URI uri, java.net.SocketAddress sa, java.io.IOException ioe)
- Specified by:
connectFailed
in classjava.net.ProxySelector
-
getSOCKSProxy
public java.net.Proxy getSOCKSProxy(java.lang.String host, int port, java.net.InetSocketAddress target)
- Specified by:
getSOCKSProxy
in interfaceAEProxySelector
-
getSOCKSProxy
public java.net.Proxy getSOCKSProxy(java.net.InetSocketAddress isa, java.net.InetSocketAddress target)
- Specified by:
getSOCKSProxy
in interfaceAEProxySelector
-
getActiveProxy
public java.net.Proxy getActiveProxy()
- Specified by:
getActiveProxy
in interfaceAEProxySelector
-
connectFailed
public void connectFailed(java.net.Proxy proxy, java.lang.Throwable error)
- Specified by:
connectFailed
in interfaceAEProxySelector
-
getLastConnectionTime
public long getLastConnectionTime()
- Specified by:
getLastConnectionTime
in interfaceAEProxySelector
-
getLastFailTime
public long getLastFailTime()
- Specified by:
getLastFailTime
in interfaceAEProxySelector
-
getConnectionCount
public int getConnectionCount()
- Specified by:
getConnectionCount
in interfaceAEProxySelector
-
getFailCount
public int getFailCount()
- Specified by:
getFailCount
in interfaceAEProxySelector
-
getInfo
public java.lang.String getInfo()
- Specified by:
getInfo
in interfaceAEProxySelector
-
-