javax.net

Class ServerSocketFactory

public abstract class ServerSocketFactory extends Object

A factory for server sockets. The purpose of this class is to serve as the superclass of server socket factories that produce server sockets of a particular type, such as Secure Socket Layer (SSL) server sockets.
Constructor Summary
protected ServerSocketFactory()
Default 0-argument constructor.
Method Summary
ServerSocketcreateServerSocket()
Create an unbound server socket.
abstract ServerSocketcreateServerSocket(int port)
Create a server socket bound to the given port.
abstract ServerSocketcreateServerSocket(int port, int backlog)
abstract ServerSocketcreateServerSocket(int port, int backlog, InetAddress bindAddress)
static ServerSocketFactorygetDefault()
Returns the default server socket factory.

Constructor Detail

ServerSocketFactory

protected ServerSocketFactory()
Default 0-argument constructor.

Method Detail

createServerSocket

public ServerSocket createServerSocket()
Create an unbound server socket.

Returns: The new server socket.

Throws: IOException If a networking error occurs.

createServerSocket

public abstract ServerSocket createServerSocket(int port)
Create a server socket bound to the given port.

Parameters: port The port to bind the server socket to.

Returns: A server socket bound to port.

Throws: IOException If a networking error occurs.

createServerSocket

public abstract ServerSocket createServerSocket(int port, int backlog)

createServerSocket

public abstract ServerSocket createServerSocket(int port, int backlog, InetAddress bindAddress)

getDefault

public static ServerSocketFactory getDefault()
Returns the default server socket factory. The type of factory returned may depend upon the installation.

Returns: The default server socket factory.