Return-Path: Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 14158 invoked from network); 2 Jun 2000 18:57:25 -0000 Received: from adsl-63-198-47-229.dsl.snfc21.pacbell.net (HELO costin.dnt.ro) (63.198.47.229) by locus.apache.org with SMTP; 2 Jun 2000 18:57:25 -0000 Received: from eng.sun.com (costin [63.198.47.229]) by costin.dnt.ro (8.9.3+Sun/8.9.1) with ESMTP id LAA04445 for ; Fri, 2 Jun 2000 11:56:47 -0700 (PDT) Sender: costin@costin.dnt.ro Message-ID: <39380459.E691F1@eng.sun.com> Date: Fri, 02 Jun 2000 12:00:41 -0700 From: Costin Manolache X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.12-20 i686) X-Accept-Language: en MIME-Version: 1.0 To: tomcat-dev@jakarta.apache.org Subject: Re: Bridging org.apache.tomcat.net.ServerSocketFactory with javax.net References: <200006021635.KAA13867@durango.Central.Sun.COM> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N Arieh Markel wrote: > During my work on trying to get SSL to work with Jakarta/Tomcat, I ran > across the issue of (in)compatibility between the ServerSocketFactory > classes found in org.apache.tomcat.net and javax.net. > > I realized the utility of being able to bridge between both definitions. > > As a result I am proposing the incorporation of the following class, > which could then be extended by specialized factory implementations > (for SSL, at least): What's the difference ? Can you give a bit more details ? I am very interested in this topic - I'm also working on Certificate-based authentication and bridging javax.net.ssl, can you share some code ? Costin > package org.apache.tomcat.net; > > import java.io.*; > import java.net.*; > > import javax.net.ServerSocketFactory; > import java.net.ServerSocket; > > /** > * Utility class to wrap javax.net.ServerSocketFactory objects in > * org.apache.tomcat.net.ServerSocketFactory > */ > > public class ServerSocketFactoryWrapper > extends org.apache.tomcat.net.ServerSocketFactory { > > private ServerSocketFactory ssf; > > public ServerSocketFactoryWrapper () { > > ssf = ServerSocketFactory.getDefault(); > } > > public ServerSocket createSocket (int port) > throws IOException { > return ssf.createServerSocket (port); > } > > public ServerSocket createSocket (int port, int backlog) > throws IOException { > return ssf.createServerSocket (port, backlog); > } > > public ServerSocket createSocket (int port, int backlog, > InetAddress ifAddress) > throws IOException { > return ssf.createServerSocket (port, backlog, ifAddress); > } > } >