Package org.apache.hadoop.net
Class SocksSocketFactory
java.lang.Object
javax.net.SocketFactory
org.apache.hadoop.net.SocksSocketFactory
- All Implemented Interfaces:
Configurable
Specialized SocketFactory to create sockets with a SOCKS proxy
-
Constructor Summary
ConstructorsConstructorDescriptionDefault empty constructor (for use with the reflection API).SocksSocketFactory(Proxy proxy) Constructor with a supplied Proxy -
Method Summary
Modifier and TypeMethodDescriptioncreateSocket(String host, int port) createSocket(String host, int port, InetAddress localHostAddr, int localPort) createSocket(InetAddress addr, int port) createSocket(InetAddress addr, int port, InetAddress localHostAddr, int localPort) booleangetConf()Return the configuration used by this object.inthashCode()voidsetConf(Configuration conf) Set the configuration to be used by this object.Methods inherited from class javax.net.SocketFactory
getDefault
-
Constructor Details
-
SocksSocketFactory
public SocksSocketFactory()Default empty constructor (for use with the reflection API). -
SocksSocketFactory
Constructor with a supplied Proxy- Parameters:
proxy- the proxy to use to create sockets
-
-
Method Details
-
createSocket
- Overrides:
createSocketin classSocketFactory- Throws:
IOException
-
createSocket
- Specified by:
createSocketin classSocketFactory- Throws:
IOException
-
createSocket
public Socket createSocket(InetAddress addr, int port, InetAddress localHostAddr, int localPort) throws IOException - Specified by:
createSocketin classSocketFactory- Throws:
IOException
-
createSocket
- Specified by:
createSocketin classSocketFactory- Throws:
IOExceptionUnknownHostException
-
createSocket
public Socket createSocket(String host, int port, InetAddress localHostAddr, int localPort) throws IOException, UnknownHostException - Specified by:
createSocketin classSocketFactory- Throws:
IOExceptionUnknownHostException
-
hashCode
public int hashCode() -
equals
-
getConf
Description copied from interface:ConfigurableReturn the configuration used by this object.- Specified by:
getConfin interfaceConfigurable- Returns:
- Configuration
-
setConf
Description copied from interface:ConfigurableSet the configuration to be used by this object.- Specified by:
setConfin interfaceConfigurable- Parameters:
conf- configuration to be used
-