org.jacorb.orb.factory
Class FixedAddressSocketFactory

java.lang.Object
  extended by org.jacorb.orb.factory.AbstractSocketFactory
      extended by org.jacorb.orb.factory.FixedAddressSocketFactory
All Implemented Interfaces:
org.jacorb.config.Configurable, SocketFactory

public class FixedAddressSocketFactory
extends AbstractSocketFactory

a SocketFactory implementation that allows to specify the local address the socket should be bound to. the factory will read the attribute OAIAddr from the configuration and use the specified value to configure the sockets it creates.

Version:
$Id: FixedAddressSocketFactory.java,v 1.8 2009-04-25 10:10:35 andre.spiegel Exp $
Author:
Nicolas Noffke

Field Summary
 
Fields inherited from class org.jacorb.orb.factory.AbstractSocketFactory
logger
 
Constructor Summary
FixedAddressSocketFactory()
           
 
Method Summary
 void configure(org.jacorb.config.Configuration config)
           
 java.net.Socket createSocket(java.lang.String host, int port)
          create a connected stream Socket.
protected  java.net.Socket doCreateSocket(java.lang.String host, int port, int timeout)
           
 boolean isSSL(java.net.Socket socket)
           
 
Methods inherited from class org.jacorb.orb.factory.AbstractSocketFactory
createSocket
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FixedAddressSocketFactory

public FixedAddressSocketFactory()
Method Detail

createSocket

public java.net.Socket createSocket(java.lang.String host,
                                    int port)
                             throws java.io.IOException
Description copied from interface: SocketFactory
create a connected stream Socket.

Parameters:
host - the host name
port - the port number
Returns:
a connected stream Socket
Throws:
java.io.IOException

doCreateSocket

protected java.net.Socket doCreateSocket(java.lang.String host,
                                         int port,
                                         int timeout)
                                  throws java.io.IOException
Specified by:
doCreateSocket in class AbstractSocketFactory
Throws:
java.io.IOException

isSSL

public boolean isSSL(java.net.Socket socket)
Returns:
true if the specified socket supports SSL.

configure

public void configure(org.jacorb.config.Configuration config)
               throws org.jacorb.config.ConfigurationException
Specified by:
configure in interface org.jacorb.config.Configurable
Overrides:
configure in class AbstractSocketFactory
Throws:
org.jacorb.config.ConfigurationException