org.apache.hadoop.net
Class SocksSocketFactory

java.lang.Object
  extended by javax.net.SocketFactory
      extended by org.apache.hadoop.net.SocksSocketFactory
All Implemented Interfaces:
Configurable

public class SocksSocketFactory
extends SocketFactory
implements Configurable

Specialized SocketFactory to create sockets with a SOCKS proxy


Constructor Summary
SocksSocketFactory()
          Default empty constructor (for use with the reflection API).
SocksSocketFactory(Proxy proxy)
          Constructor with a supplied Proxy
 
Method Summary
 Socket createSocket()
           
 Socket createSocket(InetAddress addr, int port)
           
 Socket createSocket(InetAddress addr, int port, InetAddress localHostAddr, int localPort)
           
 Socket createSocket(String host, int port)
           
 Socket createSocket(String host, int port, InetAddress localHostAddr, int localPort)
           
 boolean equals(Object obj)
           
 Configuration getConf()
          Return the configuration used by this object.
 int hashCode()
           
 void setConf(Configuration conf)
          Set the configuration to be used by this object.
 
Methods inherited from class javax.net.SocketFactory
getDefault
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SocksSocketFactory

public SocksSocketFactory()
Default empty constructor (for use with the reflection API).


SocksSocketFactory

public SocksSocketFactory(Proxy proxy)
Constructor with a supplied Proxy

Parameters:
proxy - the proxy to use to create sockets
Method Detail

createSocket

public Socket createSocket()
                    throws IOException
Overrides:
createSocket in class SocketFactory
Throws:
IOException

createSocket

public Socket createSocket(InetAddress addr,
                           int port)
                    throws IOException
Specified by:
createSocket in class SocketFactory
Throws:
IOException

createSocket

public Socket createSocket(InetAddress addr,
                           int port,
                           InetAddress localHostAddr,
                           int localPort)
                    throws IOException
Specified by:
createSocket in class SocketFactory
Throws:
IOException

createSocket

public Socket createSocket(String host,
                           int port)
                    throws IOException,
                           UnknownHostException
Specified by:
createSocket in class SocketFactory
Throws:
IOException
UnknownHostException

createSocket

public Socket createSocket(String host,
                           int port,
                           InetAddress localHostAddr,
                           int localPort)
                    throws IOException,
                           UnknownHostException
Specified by:
createSocket in class SocketFactory
Throws:
IOException
UnknownHostException

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getConf

public Configuration getConf()
Description copied from interface: Configurable
Return the configuration used by this object.

Specified by:
getConf in interface Configurable

setConf

public void setConf(Configuration conf)
Description copied from interface: Configurable
Set the configuration to be used by this object.

Specified by:
setConf in interface Configurable


Copyright © 2009 The Apache Software Foundation