Package com.salesforce.datacloud.jdbc.util.internal

## Class SFDefaultSocketFactoryWrapper

- java.lang.Object
- - javax.net.SocketFactory
  - - com.salesforce.datacloud.jdbc.util.internal.SFDefaultSocketFactoryWrapper

    public class SFDefaultSocketFactoryWrapper
    extends SocketFactory

Default Wrapper for SocketFactory.

### Constructor Summary

Constructors
`SFDefaultSocketFactoryWrapper​(boolean isSocksProxyDisabled)`
`SFDefaultSocketFactoryWrapper​(boolean isSocksProxyDisabled, SocketFactory socketFactory)`

### Method Summary

All Methods Instance Methods Concrete Methods
`Socket` `createSocket()` When `isSocksProxyDisabled` then, socket backed by plain socket impl is returned.
`Socket` `createSocket​(String host, int port)`
`Socket` `createSocket​(String host, int port, InetAddress clientAddress, int clientPort)`
`Socket` `createSocket​(InetAddress address, int port)`
`Socket` `createSocket​(InetAddress address, int port, InetAddress clientAddress, int clientPort)`

### Methods inherited from class javax.net.SocketFactory

`getDefault`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### SFDefaultSocketFactoryWrapper

    public SFDefaultSocketFactoryWrapper​(boolean isSocksProxyDisabled)

#### SFDefaultSocketFactoryWrapper

    public SFDefaultSocketFactoryWrapper​(boolean isSocksProxyDisabled,
                                         SocketFactory socketFactory)

### Method Detail

#### createSocket

    public Socket createSocket()
                        throws IOException

When `isSocksProxyDisabled` then, socket backed by plain socket impl is returned. Otherwise, delegates the socket creation to specified socketFactory

Overrides:
  `createSocket` in class `SocketFactory`
Returns:
  socket
Throws:
  `IOException` - when socket creation fails

#### createSocket

    public Socket createSocket​(String host,
                               int port)
                        throws IOException

Specified by:
  `createSocket` in class `SocketFactory`
Throws:
  `IOException`

#### createSocket

    public Socket createSocket​(InetAddress address,
                               int port)
                        throws IOException

Specified by:
  `createSocket` in class `SocketFactory`
Throws:
  `IOException`

#### createSocket

    public Socket createSocket​(String host,
                               int port,
                               InetAddress clientAddress,
                               int clientPort)
                        throws IOException

Specified by:
  `createSocket` in class `SocketFactory`
Throws:
  `IOException`

#### createSocket

    public Socket createSocket​(InetAddress address,
                               int port,
                               InetAddress clientAddress,
                               int clientPort)
                        throws IOException

Specified by:
  `createSocket` in class `SocketFactory`
Throws:
  `IOException`