1 7 8 package org.objectweb.rmijdbc; 9 10 import java.net.*; 11 import java.io.*; 12 import javax.net.ssl.*; 13 import java.rmi.server.*; 14 15 16 19 public class RJSSLServerSocketFactory implements RMIServerSocketFactory, Serializable { 20 public ServerSocket createServerSocket(int serverPort) 21 throws IOException { 22 try { 23 SSLServerSocketFactory factory = 24 (SSLServerSocketFactory) SSLServerSocketFactory.getDefault(); 25 26 SSLServerSocket sslSocket = 27 (SSLServerSocket) factory.createServerSocket(serverPort); 28 29 31 return sslSocket; 36 } catch(IOException e) { 37 e.printStackTrace(); 38 System.exit(1); 39 } 40 return null; 41 } 42 } 43 | Popular Tags |