org.jacorb.orb.factory
Class PortRangeServerSocketFactory

java.lang.Object
  extended by org.jacorb.orb.factory.PortRangeServerSocketFactory
All Implemented Interfaces:
org.apache.avalon.framework.configuration.Configurable, ServerSocketFactory

public class PortRangeServerSocketFactory
extends java.lang.Object
implements ServerSocketFactory, org.apache.avalon.framework.configuration.Configurable

Version:
$Id: PortRangeServerSocketFactory.java,v 1.8 2006/08/03 10:31:24 alphonse.bendt Exp $
Author:
Steve Osselton

Field Summary
static java.lang.String MAX_PROP
           
static java.lang.String MIN_PROP
           
 
Constructor Summary
PortRangeServerSocketFactory()
           
PortRangeServerSocketFactory(ServerSocketFactory delegate)
           
 
Method Summary
 void configure(org.apache.avalon.framework.configuration.Configuration config)
           
 java.net.ServerSocket createServerSocket(int port)
           
 java.net.ServerSocket createServerSocket(int port, int backlog)
          Returns a server socket which uses all network interfaces on the host, and is bound to the specified port.
 java.net.ServerSocket createServerSocket(int port, int backlog, java.net.InetAddress ifAddress)
          Returns a server socket which uses all network interfaces on the host, is bound to a the specified port, and uses the specified connection backlog.
protected  int getPortProperty(org.apache.avalon.framework.configuration.Configuration config, java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MIN_PROP

public static final java.lang.String MIN_PROP
See Also:
Constant Field Values

MAX_PROP

public static final java.lang.String MAX_PROP
See Also:
Constant Field Values
Constructor Detail

PortRangeServerSocketFactory

public PortRangeServerSocketFactory(ServerSocketFactory delegate)

PortRangeServerSocketFactory

public PortRangeServerSocketFactory()
Method Detail

configure

public void configure(org.apache.avalon.framework.configuration.Configuration config)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable
Throws:
org.apache.avalon.framework.configuration.ConfigurationException

createServerSocket

public java.net.ServerSocket createServerSocket(int port,
                                                int backlog)
                                         throws java.io.IOException
Description copied from interface: ServerSocketFactory
Returns a server socket which uses all network interfaces on the host, and is bound to the specified port.

Specified by:
createServerSocket in interface ServerSocketFactory
Parameters:
port - - the port to listen to
backlog - - how many connections are queued
Throws:
java.io.IOException - - for networking errors

createServerSocket

public java.net.ServerSocket createServerSocket(int port,
                                                int backlog,
                                                java.net.InetAddress ifAddress)
                                         throws java.io.IOException
Description copied from interface: ServerSocketFactory
Returns a server socket which uses all network interfaces on the host, is bound to a the specified port, and uses the specified connection backlog. The socket is configured with the socket options (such as accept timeout) given to this factory.

Specified by:
createServerSocket in interface ServerSocketFactory
Parameters:
port - - the port to listen to
backlog - - how many connections are queued
Throws:
java.io.IOException - - for networking errors

createServerSocket

public java.net.ServerSocket createServerSocket(int port)
                                         throws java.net.BindException
Specified by:
createServerSocket in interface ServerSocketFactory
Throws:
java.net.BindException

getPortProperty

protected int getPortProperty(org.apache.avalon.framework.configuration.Configuration config,
                              java.lang.String name)
                       throws org.apache.avalon.framework.configuration.ConfigurationException
Throws:
org.apache.avalon.framework.configuration.ConfigurationException