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
 ServerSocket createServerSocket(int port)
          Creates a socket on specified port.
 ServerSocket createServerSocket(int port, int backLog)
          Creates a socket on specified port with a specified backLog.
 ServerSocket createServerSocket(int port, int backLog, InetAddress bindAddress)
          Creates a socket on a particular network interface on specified port with a specified backLog.
 

Method Detail

createServerSocket

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

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

createServerSocket

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

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

createServerSocket

public ServerSocket createServerSocket(int port,
                                       int backLog,
                                       InetAddress bindAddress)
                                throws 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:
IOException - if an error occurs


Copyright © Apache Software Foundation. All Rights Reserved.