public abstract class ServerSocketFactory extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
ServerSocketFactory()
Creates a new
ServerSocketFactory instance. |
| Modifier and Type | Method and Description |
|---|---|
ServerSocket |
createServerSocket()
Creates a new server socket which is not bound to any local address.
|
abstract ServerSocket |
createServerSocket(int port)
Creates a new server socket which is bound to the given port with a
maximum backlog of 50 unaccepted connections.
|
abstract ServerSocket |
createServerSocket(int port,
int backlog)
Creates a new server socket which is bound to the given port and
configures its maximum of queued connections.
|
abstract ServerSocket |
createServerSocket(int port,
int backlog,
InetAddress iAddress)
Creates a new server socket which is bound to the given address on the
specified port and configures its maximum of queued connections.
|
static ServerSocketFactory |
getDefault()
Gets the default server socket factory of the system which can be used to
create new server sockets without creating a subclass of this factory.
|
protected ServerSocketFactory()
ServerSocketFactory instance.public static ServerSocketFactory getDefault()
public ServerSocket createServerSocket() throws IOException
SocketException is thrown.IOException - if an error occurs while creating a new server socket.public abstract ServerSocket createServerSocket(int port) throws IOException
port - the port on which the created socket has to listen.IOException - if an error occurs while creating a new server socket.public abstract ServerSocket createServerSocket(int port, int backlog) throws IOException
port - the port on which the created socket has to listen.backlog - the maximum number of unaccepted connections. Passing 0 or
a negative value yields the default backlog of 50.IOException - if an error occurs while creating a new server socket.public abstract ServerSocket createServerSocket(int port, int backlog, InetAddress iAddress) throws IOException
port - the port on which the created socket has to listen.backlog - the maximum number of unaccepted connections. Passing 0 or
a negative value yields the default backlog of 50.iAddress - the address of the network interface which is used by the
created socket.IOException - if an error occurs while creating a new server socket.