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):
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);
}
}
The implicit dependency here is in including the jnet.jar that comes
included with the jsse1.0.1 deliverables.
Ideas ?
Opinions ?
Arieh
--
Arieh Markel Sun Microsystems Inc.
Network Storage 500 Eldorado Blvd. MS UBRM11-194
e-mail: arieh.markel@sun.COM Broomfield, CO 80021
Let's go Panthers !!!! Phone: (303) 272-8547 x78547
(e-mail me with subject SEND PUBLIC KEY to get public key)
|