tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1043425 - /tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java
Date Wed, 08 Dec 2010 14:09:26 GMT
Author: markt
Date: Wed Dec  8 14:09:26 2010
New Revision: 1043425

URL: http://svn.apache.org/viewvc?rev=1043425&view=rev
Log:
Align BIO+JSSE with NIO+JSSE

Modified:
    tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java?rev=1043425&r1=1043424&r2=1043425&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java Wed Dec  8 14:09:26 2010
@@ -20,7 +20,6 @@ package org.apache.coyote.http11;
 import java.net.Socket;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
-import java.util.Iterator;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentLinkedQueue;
 import java.util.concurrent.atomic.AtomicInteger;
@@ -36,10 +35,9 @@ import org.apache.tomcat.util.modeler.Re
 import org.apache.tomcat.util.net.AbstractEndpoint;
 import org.apache.tomcat.util.net.JIoEndpoint;
 import org.apache.tomcat.util.net.JIoEndpoint.Handler;
-import org.apache.tomcat.util.net.SSLImplementation;
-import org.apache.tomcat.util.net.ServerSocketFactory;
 import org.apache.tomcat.util.net.SocketStatus;
 import org.apache.tomcat.util.net.SocketWrapper;
+import org.apache.tomcat.util.net.jsse.JSSEImplementation;
 
 
 /**
@@ -85,43 +83,15 @@ public class Http11Protocol extends Abst
     protected Http11ConnectionHandler cHandler;
 
 
-    protected ServerSocketFactory socketFactory = null;
-   
-
     // ----------------------------------------- ProtocolHandler Implementation
 
     @Override
     public void init() throws Exception {
         endpoint.setName(getName());
 
-        // Verify the validity of the configured socket factory
-        try {
-            if (isSSLEnabled()) {
-                sslImplementation =
-                    SSLImplementation.getInstance(sslImplementationName);
-                socketFactory = sslImplementation.getServerSocketFactory();
-                ((JIoEndpoint)endpoint).setServerSocketFactory(socketFactory);
-            } else if (socketFactoryName != null) {
-                socketFactory = (ServerSocketFactory) Class.forName(socketFactoryName).newInstance();
-                ((JIoEndpoint)endpoint).setServerSocketFactory(socketFactory);
-            }
-        } catch (Exception ex) {
-            log.error(sm.getString("http11protocol.socketfactory.initerror"),
-                      ex);
-            throw ex;
-        }
-
-        if (socketFactory!=null) {
-            Iterator<String> attE = attributes.keySet().iterator();
-            while( attE.hasNext() ) {
-                String key = attE.next();
-                Object v=attributes.get(key);
-                socketFactory.setAttribute(key, v);
-            }
-        }
-        
         try {
             endpoint.init();
+            sslImplementation = new JSSEImplementation();
         } catch (Exception ex) {
             log.error(sm.getString("http11protocol.endpoint.initerror"), ex);
             throw ex;
@@ -159,25 +129,6 @@ public class Http11Protocol extends Abst
     }
 
 
-    // ------------------------------------------------------------- Properties
-
-    /**
-     * Name of the socket factory.
-     */
-    protected String socketFactoryName = null;
-    public String getSocketFactory() { return socketFactoryName; }
-    public void setSocketFactory(String valueS) { socketFactoryName = valueS; }
-    
-    /**
-     * Name of the SSL implementation.
-     */
-    protected String sslImplementationName=null;
-    public String getSSLImplementation() { return sslImplementationName; }
-    public void setSSLImplementation( String valueS) {
-        sslImplementationName = valueS;
-        setSecure(true);
-    }
-    
     // -----------------------------------  Http11ConnectionHandler Inner Class
 
     protected static class Http11ConnectionHandler implements Handler {



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message