public class ServerProxySelector extends ProxySelector
Constructor and Description |
---|
ServerProxySelector()
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
connectFailed(URI uri,
SocketAddress sa,
IOException ioe)
Called to indicate that a connection could not be established to a proxy/socks server.
|
static HttpsURLConnection |
createHttpsURLConnection(URL url,
String proxyUserID,
String destUserID)
Creates a HTTPS connection.
|
static HttpURLConnection |
createHttpURLConnection(URL url,
String proxyUserID,
String destUserID)
Creates a HTTP connection.
|
static URLConnection |
createURLConnection(URL url)
Creates an URL connection.
|
static void |
initialize(IniFile ini)
Initializes the proxy selector from the INI file.
|
static int |
processDialog(VirtualSessionManager vsm,
boolean doModal)
Displays and process the Proxy settings dialog box.
|
List<Proxy> |
select(URI uri)
Selects all the applicable proxies based on the protocol to access the resource with and a
destination address to access the resource at.
|
getDefault, setDefault
public static void initialize(IniFile ini)
public static URLConnection createURLConnection(URL url) throws IOException, URISyntaxException
url
- The URL to connect to.IOException
- for connection failures.URISyntaxException
- for invalid URL to URI conversions.IllegalArgumentException
- if either argument is null.public static HttpURLConnection createHttpURLConnection(URL url, String proxyUserID, String destUserID) throws IOException, URISyntaxException
url
- The URL to connect to.proxyUserID
- The user ID to use when no interaction is allowed (e.g. NetPhantom Server).
Set this parameter to null if a message box should be popped up.destUserID
- The destination user ID to use when no interaction is allowed (e.g. NetPhantom Server).
Set this parameter to null if a message box should be popped up.IOException
- for connection failures.URISyntaxException
- for invalid URL to URI conversions.IllegalArgumentException
- if either argument is null.public static HttpsURLConnection createHttpsURLConnection(URL url, String proxyUserID, String destUserID) throws IOException, URISyntaxException
url
- The URL to connect to.proxyUserID
- The user ID to use when no interaction is allowed (e.g. NetPhantom Server).
Set this parameter to null if a message box should be popped up.destUserID
- The destination user ID to use when no interaction is allowed (e.g. NetPhantom Server).
Set this parameter to null if a message box should be popped up.IOException
- for connection failures.URISyntaxException
- for invalid URL to URI conversions.IllegalArgumentException
- if either argument is null.public void connectFailed(URI uri, SocketAddress sa, IOException ioe)
connectFailed
in class ProxySelector
uri
- The URI that the proxy at "sa" (see parameter below) failed to serve.sa
- The socket address of the proxy/SOCKS serverioe
- The I/O exception thrown when the connect failed.IllegalArgumentException
- if either argument is nullProxySelector.connectFailed(java.net.URI, java.net.SocketAddress, java.io.IOException)
public List<Proxy> select(URI uri)
select
in class ProxySelector
uri
- The URI that a connection is required to.IllegalArgumentException
- if either argument is nullProxySelector.select(java.net.URI)
public static int processDialog(VirtualSessionManager vsm, boolean doModal)
Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.