org.codehaus.spice.netserve.sockets.impl
Class DefaultServerSocketFactory

java.lang.Object
  extended byorg.codehaus.spice.netserve.sockets.impl.DefaultServerSocketFactory
All Implemented Interfaces:
ServerSocketFactory

public class DefaultServerSocketFactory
extends Object
implements ServerSocketFactory

Factory implementation for vanilla TCP sockets.

Version:
$Revision: 1.2 $ $Date: 2004/03/21 23:42:59 $
Author:
Peter Donald

Constructor Summary
DefaultServerSocketFactory()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultServerSocketFactory

public DefaultServerSocketFactory()
Method Detail

createServerSocket

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

Specified by:
createServerSocket in interface ServerSocketFactory
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.

Specified by:
createServerSocket in interface ServerSocketFactory
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.

Specified by:
createServerSocket in interface ServerSocketFactory
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-2004 Codehaus. All Rights Reserved.