fr.dyade.aaa.common.net
Class ServerSocketFactory13
java.lang.Object
fr.dyade.aaa.common.net.ServerSocketFactory
fr.dyade.aaa.common.net.ServerSocketFactory13
public class ServerSocketFactory13
- extends ServerSocketFactory
This class implements the ServerSocketFactory interface for JDK prior to 1.4.
Method Summary |
java.net.ServerSocket |
createServerSocket(int port,
int backlog)
Creates a server socket and binds it to the specified local port number, with
the specified backlog. |
java.net.ServerSocket |
createServerSocket(int port,
int backlog,
java.net.InetAddress addr)
Create a server with the specified port, listen backlog, and local IP address to
bind to. |
static ServerSocketFactory |
getFactory()
Returns the ServerSocketFactory singleton for this class. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
factory
static ServerSocketFactory factory
- The SocketFactory singleton for this class.
ServerSocketFactory13
public ServerSocketFactory13()
getFactory
public static ServerSocketFactory getFactory()
- Returns the ServerSocketFactory singleton for this class.
- Returns:
- The ServerSocketFactory singleton for this class.
createServerSocket
public java.net.ServerSocket createServerSocket(int port,
int backlog)
throws java.io.IOException
- Creates a server socket and binds it to the specified local port number, with
the specified backlog. A port number of 0 creates a socket on any free port.
- Specified by:
createServerSocket
in class ServerSocketFactory
- Parameters:
port
- the specified port, or 0 to use any free port.backlog
- the maximum length of the queue, or 0 to use the default value.
- Throws:
java.io.IOException
- See Also:
ServerSocketFactory#createServerSocket(java.net.InetAddress, int, int)
createServerSocket
public java.net.ServerSocket createServerSocket(int port,
int backlog,
java.net.InetAddress addr)
throws java.io.IOException
- Create a server with the specified port, listen backlog, and local IP address to
bind to.
The addr argument can be used on a multi-homed host for a ServerSocket that will
only accept connect requests to one of its addresses. If addr is null, it will default
accepting connections on any/all local addresses.
- Specified by:
createServerSocket
in class ServerSocketFactory
- Parameters:
port
- the local TCP port, it must be between 0 and 65535, inclusive.backlog
- the maximum length of the queue, or 0 to use the default value.addr
- the local InetAddress the server will bind to.
- Throws:
java.io.IOException
- See Also:
ServerSocketFactory.createServerSocket(int, int, InetAddress)
Copyright © 2010 ScalAgent D.T.. All Rights Reserved.