org.apache.avalon.cornerstone.blocks.sockets
Class DefaultServerSocketFactory

java.lang.Object
  extended byorg.apache.avalon.cornerstone.blocks.sockets.DefaultServerSocketFactory
All Implemented Interfaces:
ServerSocketFactory

public class DefaultServerSocketFactory
extends java.lang.Object
implements ServerSocketFactory

Factory implementation for vanilla TCP sockets.

Author:
Peter Donald, Federico Barbieri

Constructor Summary
DefaultServerSocketFactory()
           
 
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.
 
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 java.net.ServerSocket createServerSocket(int port)
                                         throws java.io.IOException
Creates a socket on specified port.

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

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

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