FileDocCategorySizeDatePackage
SSLImplementation.javaAPI DocGlassfish v2 API4320Fri May 04 22:33:16 BST 2007org.apache.tomcat.util.net

SSLImplementation

public abstract class SSLImplementation extends Object

Fields Summary
private static com.sun.org.apache.commons.logging.Log
logger
private static final String
JSSEImplementationClass
private static final String[]
implementations
Constructors Summary
Methods Summary
public abstract java.lang.StringgetImplementationName()

public static org.apache.tomcat.util.net.SSLImplementationgetInstance()


         
    
	for(int i=0;i<implementations.length;i++){
	    try {
               SSLImplementation impl=
		    getInstance(implementations[i]);
		return impl;
	    } catch (Exception e) {
		if(logger.isTraceEnabled()) 
		    logger.trace("Error creating " + implementations[i],e);
	    }
	}

	// If we can't instantiate any of these
	throw new ClassNotFoundException("Can't find any SSL implementation");
    
public static org.apache.tomcat.util.net.SSLImplementationgetInstance(java.lang.String className)

	if(className==null) return getInstance();

	try {
	    // Workaround for the J2SE 1.4.x classloading problem (under Solaris).
	    // Class.forName(..) fails without creating class using new.
	    // This is an ugly workaround. 
	    if( JSSEImplementationClass.equals(className) ) {
		return new org.apache.tomcat.util.net.jsse.JSSEImplementation();
	    }
	    Class clazz=Class.forName(className);
	    return (SSLImplementation)clazz.newInstance();
	} catch (Exception e){
	    if(logger.isDebugEnabled())
		logger.debug("Error loading SSL Implementation "
			     +className, e);
	    throw new ClassNotFoundException("Error loading SSL Implementation "
				      +className+ " :" +e.toString());
	}
    
public abstract SSLSupportgetSSLSupport(java.net.Socket sock)

public abstract SSLSupportgetSSLSupport(javax.net.ssl.SSLEngine sslEngine)

public abstract ServerSocketFactorygetServerSocketFactory()