1 8 9 package mx4j.tools.remote.rmi; 10 11 import java.io.IOException ; 12 import java.io.Serializable ; 13 import java.net.Socket ; 14 import java.rmi.server.RMIClientSocketFactory ; 15 import javax.net.ssl.SSLSocketFactory; 16 17 20 public class SSLRMIClientSocketFactory implements RMIClientSocketFactory , Serializable 21 { 22 public Socket createSocket(String host, int port) throws IOException 23 { 24 return SSLSocketFactory.getDefault().createSocket(host, port); 25 } 26 27 public boolean equals(Object obj) 28 { 29 if (obj == null) return false; 30 if (this == obj) return true; 31 return getClass() == obj.getClass(); 32 } 33 34 public int hashCode() 35 { 36 return 13; 37 } 38 } 39 | Popular Tags |