org.jcomponent.netserve.sockets
Interface ServerSocketFactory

All Known Implementing Classes:
DefaultServerSocketFactory

public interface ServerSocketFactory

Service used to create server sockets. The factory is used so that the exact socket type and underlying transport is abstracted. The sockets created could be proxied, SSL enabled, TLS enabled etc. However clients just care that they return sockets.

Version:
$Revision: 1.1 $ $Date: 2003/07/13 17:55:13 $
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 address)
          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 (0 indicates any available port)
Returns:
the created ServerSocket
Throws:
IOException - if unable to create socket

createServerSocket

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

Parameters:
port - the port (0 indicates any available port)
backlog - the backlog
Returns:
the created ServerSocket
Throws:
IOException - if unable to create socket

createServerSocket

public ServerSocket createServerSocket(int port,
                                       int backlog,
                                       InetAddress address)
                                throws IOException
Creates a socket on a particular network interface on specified port with a specified backlog.

Parameters:
port - the port (0 indicates any available port)
backlog - the backlog
address - the network interface to bind to.
Returns:
the created ServerSocket
Throws:
IOException - if unable to create socket


Copyright © 1999-2003 The Spice Group. All Rights Reserved.