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


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

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

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

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 © 2012 Apache Software Foundation. All Rights Reserved.