SocksSocketFactory (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.net, class: SocksSocketFactory

Package org.apache.hadoop.net

# Class SocksSocketFactory

java.lang.Object
javax.net.SocketFactory
org.apache.hadoop.net.SocksSocketFactory

All Implemented Interfaces:
  `Configurable`

@Public @Evolving public class SocksSocketFactory extends SocketFactory implements Configurable
Specialized SocketFactory to create sockets with a SOCKS proxy

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SocksSocketFactory()`
  Default empty constructor (for use with the reflection API).
  `SocksSocketFactory(Proxy proxy)`
  Constructor with a supplied Proxy

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Socket`
  `createSocket()`
  `Socket`
  `createSocket(String host, int port)`
  `Socket`
  `createSocket(String host, int port, InetAddress localHostAddr, int localPort)`
  `Socket`
  `createSocket(InetAddress addr, int port)`
  `Socket`
  `createSocket(InetAddress addr, 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 Details

  - ### 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 Details

  - ### 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`
    Returns:
      Configuration

  - ### 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`
    Parameters:
      `conf` - configuration to be used