public class ProxySocketFactory extends SocketFactory
Constructor and Description |
---|
ProxySocketFactory(Proxy.Type proxyType,
String hostname,
int port)
A convenience constructor for creating a proxy with the specified host
and port.
|
ProxySocketFactory(Proxy proxy)
Create all sockets with the specified proxy.
|
Modifier and Type | Method and Description |
---|---|
Socket |
createSocket(InetAddress ia,
int i) |
Socket |
createSocket(InetAddress ia,
int i,
InetAddress localAddress,
int localPort) |
Socket |
createSocket(String string,
int i) |
Socket |
createSocket(String string,
int i,
InetAddress localAddress,
int localPort) |
createSocket, getDefault
public ProxySocketFactory(Proxy proxy)
proxy
- An existing proxypublic ProxySocketFactory(Proxy.Type proxyType, String hostname, int port)
proxyType
- The type of proxy were connecting tohostname
- The hostname of the proxy serverport
- The port of the proxy serverpublic Socket createSocket(String string, int i) throws IOException, UnknownHostException
createSocket
in class SocketFactory
IOException
UnknownHostException
public Socket createSocket(String string, int i, InetAddress localAddress, int localPort) throws IOException, UnknownHostException
createSocket
in class SocketFactory
IOException
UnknownHostException
public Socket createSocket(InetAddress ia, int i) throws IOException
createSocket
in class SocketFactory
IOException
public Socket createSocket(InetAddress ia, int i, InetAddress localAddress, int localPort) throws IOException
createSocket
in class SocketFactory
IOException
Copyright © 2010–2020 Leon Blakey. All rights reserved.