FileDocCategorySizeDatePackage
SocketFactoryFactory.javaAPI DocApache Axis 1.42944Sat Apr 22 18:57:28 BST 2006org.apache.axis.components.net

SocketFactoryFactory

public class SocketFactoryFactory extends Object
Class SocketFactoryFactory
author
version
%I%, %G%

Fields Summary
protected static Log
log
Field log
private static Hashtable
factories
socket factory
private static final Class[]
classes
Constructors Summary
Methods Summary
public static synchronized SocketFactorygetFactory(java.lang.String protocol, java.util.Hashtable attributes)
Returns a copy of the environment's default socket factory.

param
protocol Today this only supports "http" & "https".
param
attributes
return



     
        AxisProperties.setClassOverrideProperty(SocketFactory.class,
                                       "axis.socketFactory");

        AxisProperties.setClassDefault(SocketFactory.class,
                                       "org.apache.axis.components.net.DefaultSocketFactory");

        AxisProperties.setClassOverrideProperty(SecureSocketFactory.class,
                                       "axis.socketSecureFactory");

        AxisProperties.setClassDefault(SecureSocketFactory.class,
                                       "org.apache.axis.components.net.JSSESocketFactory");
    
        SocketFactory theFactory = (SocketFactory)factories.get(protocol);

        if (theFactory == null) {
            Object objects[] = new Object[] { attributes };
    
            if (protocol.equalsIgnoreCase("http")) {
                theFactory = (SocketFactory)
                    AxisProperties.newInstance(SocketFactory.class, classes, objects);
            } else if (protocol.equalsIgnoreCase("https")) {
                theFactory = (SecureSocketFactory)
                    AxisProperties.newInstance(SecureSocketFactory.class, classes, objects);
            }
            
            if (theFactory != null) {
                factories.put(protocol, theFactory);
            }
        }
        return theFactory;