This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.net
class ServerSocketFactory

java.lang.Object extended by javax.net.ServerSocketFactory
Direct Known Subclasses:
SSLServerSocketFactory

Most common ways to construct:

ServerSocketFactory serverSocketFactory = SSLServerSocketFactory.getDefault();

Based on 26 examples

 

SSLContext sslc = …;

ServerSocketFactory ssf = sslc.getServerSocketFactory();

Based on 24 examples


public abstract class ServerSocketFactory
extends 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 (auto-generated):

Socket

ServerSocket

SSLSocketFactory


Constructor Summary
protected

          Creates a server socket factory.
 
Method Summary
 ServerSocket

          Returns an unbound server socket.
abstract ServerSocket

          Returns a server socket bound to the specified port.
abstract ServerSocket
createServerSocket(int port, int backlog)

          Returns a server socket bound to the specified port, and uses the specified connection backlog.
abstract ServerSocket
createServerSocket(int port, int backlog, InetAddress ifAddress)

          Returns a server socket bound to the specified port, with a specified listen backlog and local IP.
static ServerSocketFactory

          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
 

Constructor Detail

ServerSocketFactory

protected ServerSocketFactory()
Creates a server socket factory.

Method Detail

createServerSocket

public ServerSocket createServerSocket()
                                throws IOException
Returns an unbound server socket. The socket is configured with the socket options (such as accept timeout) given to this factory.

Returns:
the unbound socket
Throws:
IOException - if the socket cannot be created

createServerSocket

public abstract ServerSocket createServerSocket(int port)
                                         throws IOException
Returns a server socket bound to the specified port. The socket is configured with the socket options (such as accept timeout) given to this factory.

Parameters:
port - the port to listen to
Returns:
the ServerSocket
Throws:
IOException - for networking errors

createServerSocket

public abstract ServerSocket createServerSocket(int port,
                                                int backlog)
                                         throws IOException
Returns a server socket bound to 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
Returns:
the ServerSocket
Throws:
IOException - for networking errors

createServerSocket

public abstract ServerSocket createServerSocket(int port,
                                                int backlog,
                                                InetAddress ifAddress)
                                         throws IOException
Returns a server socket bound to the specified port, with a specified listen backlog and local IP. The bindAddr argument can be used on a multi-homed host for a ServerSocket that will only accept connect requests to one of its addresses. 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
Returns:
the ServerSocket
Throws:
IOException - for networking errors

getDefault

public static ServerSocketFactory getDefault()
Returns a copy of the environment's default socket factory.

Returns:
the ServerSocketFactory


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.