public class InternetProxySelector
extends java.net.ProxySelector
An instance of this class is created when a DTSContainer is created. During the initialization of this class, the static ProxySelector is get and if it is not an instance of this class it is set to the created instance. If the ProxySelector is an instance of this class it is reused, new proxies are added to the existing instance. Existing proxies remains untouched. If a proxy that is banned (due to inactivity) is added it is ignored.
Adding proxies is done by adding properties to the new DTS being created. Properties are read by this class and proxies are configured accordingly. The following properties are recognized and used:
According to the API, the ProxySelector is static, therefore all DTSContainers will share the same
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
noProxyFor
The Constant noProxyFor.
|
static java.lang.String |
proxyAddress
The Constant proxyAddress.
|
static java.lang.String |
proxyPort
The Constant proxyPort.
|
static java.lang.String |
proxyPropertyHeader
The Constant proxyPropertyHeader.
|
static java.lang.String |
proxyType
The Constant proxyType.
|
Constructor and Description |
---|
InternetProxySelector(java.util.Properties props)
Instantiates a new internet proxy selector.
|
Modifier and Type | Method and Description |
---|---|
void |
connectFailed(java.net.URI uri,
java.net.SocketAddress sa,
java.io.IOException ioe)
Connect failed.
|
boolean |
isRegistered()
During the instance creation, the InternetProxySelector is registered
as the default proxy selector if there are properties indicating that
it must be registered.
|
static InternetProxySelector |
make(java.util.Properties props)
Make.
|
java.util.List<java.net.Proxy> |
select(java.net.URI uri)
Select.
|
public static final java.lang.String proxyPropertyHeader
public static final java.lang.String proxyAddress
public static final java.lang.String proxyPort
public static final java.lang.String proxyType
public static final java.lang.String noProxyFor
public InternetProxySelector(java.util.Properties props)
props
- the propspublic static InternetProxySelector make(java.util.Properties props)
props
- the propspublic boolean isRegistered()
public java.util.List<java.net.Proxy> select(java.net.URI uri)
select
in class java.net.ProxySelector
uri
- the uripublic void connectFailed(java.net.URI uri, java.net.SocketAddress sa, java.io.IOException ioe)
connectFailed
in class java.net.ProxySelector
uri
- the urisa
- the saioe
- the ioeCopyright 2006-2015 Reporting Standard S.L., C/ Torrecilla del Puerto 1, 28043, Madrid, Espaņa