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
Modifier and Type
Field
Description
`protected static SocketFactory`
`defaultFactory`
`protected static SocketFactory`
`factory`

## Constructor Summary

Constructors
Constructor
Description
`SocketFactory()`

## Method Summary

Modifier and Type
Method
Description
`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 Details

### defaultFactory

protected static SocketFactory defaultFactory

### factory

protected static SocketFactory factory

## Constructor Details

### SocketFactory

public SocketFactory()

## Method Details

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