org.apache.avalon.cornerstone.services.sockets
Interface ServerSocketFactory

All Known Implementing Classes:
DefaultServerSocketFactory, TLSServerSocketFactory

public interface ServerSocketFactory

The interface used to create server sockets.

Author:
Peter Donald

Method Summary
 java.net.ServerSocket createServerSocket(int port)
          Creates a socket on specified port.
 java.net.ServerSocket createServerSocket(int port, int backLog)
          Creates a socket on specified port with a specified backLog.
 java.net.ServerSocket createServerSocket(int port, int backLog, java.net.InetAddress bindAddress)
          Creates a socket on a particular network interface on specified port with a specified backLog.
 

Method Detail

createServerSocket

public java.net.ServerSocket createServerSocket(int port)
                                         throws java.io.IOException
Creates a socket on specified port.

Parameters:
port - the port
Returns:
the created ServerSocket
Throws:
java.io.IOException - if an error occurs

createServerSocket

public java.net.ServerSocket createServerSocket(int port,
                                                int backLog)
                                         throws java.io.IOException
Creates a socket on specified port with a specified backLog.

Parameters:
port - the port
backLog - the backLog
Returns:
the created ServerSocket
Throws:
java.io.IOException - if an error occurs

createServerSocket

public java.net.ServerSocket createServerSocket(int port,
                                                int backLog,
                                                java.net.InetAddress bindAddress)
                                         throws java.io.IOException
Creates a socket on a particular network interface on specified port with a specified backLog.

Parameters:
port - the port
backLog - the backLog
bindAddress - the network interface to bind to.
Returns:
the created ServerSocket
Throws:
java.io.IOException - if an error occurs


Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.