Package org.eclipse.ecf.provider.comm.tcp

## Class SocketFactory

- java.lang.Object
- - org.eclipse.ecf.provider.comm.tcp.SocketFactory

All Implemented Interfaces:
  `IClientSocketFactory`, `IServerSocketFactory`

    public class SocketFactory
    extends Object
    implements IClientSocketFactory, IServerSocketFactory

### Field Summary

Fields
`protected static SocketFactory` `defaultFactory`
`protected static SocketFactory` `factory`

### Constructor Summary

Constructors
`SocketFactory()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`ServerSocket` `createServerSocket​(int port, int backlog)`
`ServerSocket` `createServerSocket​(int port, int backlog, InetAddress bindAddress)`
`Socket` `createSocket​(String name, int port, int timeout)`
`static SocketFactory` `getDefaultSocketFactory()`
`static SocketFactory` `getSocketFactory()`
`static void` `setSocketFactory​(SocketFactory fact)`

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

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

### Field Detail

#### defaultFactory

    protected static SocketFactory defaultFactory

#### factory

    protected static SocketFactory factory

### Constructor Detail

#### SocketFactory

    public SocketFactory()

### Method Detail

#### createSocket

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

Specified by:
  `createSocket` in interface `IClientSocketFactory`
Throws:
  `IOException`

#### createServerSocket

    public ServerSocket createServerSocket​(int port,
                                           int backlog)
                                    throws IOException

Specified by:
  `createServerSocket` in interface `IServerSocketFactory`
Throws:
  `IOException`

#### createServerSocket

    public ServerSocket createServerSocket​(int port,
                                           int backlog,
                                           InetAddress bindAddress)
                                    throws IOException

Parameters:
  `port` - port
  `backlog` - backlog
  `bindAddress` - bindAddress
Returns:
  ServerSocket server socket created
Throws:
  `IOException` - if server socket cannot be created
Since:
  4.4

#### getSocketFactory

    public static SocketFactory getSocketFactory()

#### getDefaultSocketFactory

    public static SocketFactory getDefaultSocketFactory()

#### setSocketFactory

    public static void setSocketFactory​(SocketFactory fact)