javax.net
Class  ServerSocketFactory
java.lang.Object
  |
  +--javax.net.ServerSocketFactory
- Direct Known Subclasses: 
- SSLServerSocketFactory
- public abstract class ServerSocketFactory- extends java.lang.Object
This class creates server sockets.  It may be subclassed by other
 factories, which create particular types of server sockets.  This
 provides a general framework for the addition of public socket-level
 functionality.  It is the server side analogue of a socket factory,
 and similarly provides a way to capture a variety of policies related
 to the sockets being constructed.
 
 Like socket factories, Server Socket factory instances have
 methods used to create sockets. There is also an environment
 specific default server socket factory; frameworks will often use
 their own customized factory.
 
- See Also: 
- SocketFactory
 
| Method Summary | 
| abstract  java.net.ServerSocket | createServerSocket(int port)Returns a server socket which uses all network interfaces on
 the host, and is bound to the specified port.
 | 
| abstract  java.net.ServerSocket | createServerSocket(int port,
                   int backlog)Returns a server socket which uses all network interfaces on
 the host, is bound to a the specified port, and uses the 
 specified connection backlog.
 | 
| abstract  java.net.ServerSocket | createServerSocket(int port,
                   int backlog,
                   java.net.InetAddress ifAddress)Returns a server socket which uses only the specified network
 interface on the local host, is bound to a the specified port,
 and uses the specified connection backlog.
 | 
| static ServerSocketFactory | getDefault()Returns a copy of the environment's default socket factory.
 | 
 
| Methods inherited from class java.lang.Object | 
| clone, 
equals, 
finalize, 
getClass, 
hashCode, 
notify, 
notifyAll, 
toString, 
wait, 
wait, 
wait | 
 
ServerSocketFactory
protected ServerSocketFactory()
- Constructor is used only by subclasses.
getDefault
public static ServerSocketFactory getDefault()
- Returns a copy of the environment's default socket factory.
createServerSocket
public abstract java.net.ServerSocket createServerSocket(int port)
                                                  throws java.io.IOException
- Returns a server socket which uses all network interfaces on
 the host, and is bound to the specified port.- 
- Parameters:
- port- the port to listen to
- Throws:
- java.io.IOException - for networking errors
 
createServerSocket
public abstract java.net.ServerSocket createServerSocket(int port,
                                                         int backlog)
                                                  throws java.io.IOException
- Returns a server socket which uses all network interfaces on
 the host, is bound to a the specified port, and uses the 
 specified connection backlog.  The socket is configured with
 the socket options (such as accept timeout) given to this factory.- 
- Parameters:
- port- the port to listen to
- backlog- how many connections are queued
- Throws:
- java.io.IOException - for networking errors
 
createServerSocket
public abstract java.net.ServerSocket createServerSocket(int port,
                                                         int backlog,
                                                         java.net.InetAddress ifAddress)
                                                  throws java.io.IOException
- Returns a server socket which uses only the specified network
 interface on the local host, is bound to a the specified port,
 and uses the specified connection backlog.  The socket is configured
 with the socket options (such as accept timeout) given to this factory.- 
- Parameters:
- port- the port to listen to
- backlog- how many connections are queued
- ifAddress- the network interface address to use
- Throws:
- java.io.IOException - for networking errors