tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Costin Manolache <cos...@eng.sun.com>
Subject Re: Bridging org.apache.tomcat.net.ServerSocketFactory with javax.net
Date Fri, 02 Jun 2000 19:00:41 GMT
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);
>     }
> }
>


Mime
View raw message