01: /*
02: * Copyright (C) The MX4J Contributors.
03: * All rights reserved.
04: *
05: * This software is distributed under the terms of the MX4J License version 1.0.
06: * See the terms of the MX4J License in the documentation provided with this software.
07: */
08:
09: 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: /**
18: * @version $Revision: 1.3 $
19: */
20: public class SSLRMIClientSocketFactory implements
21: RMIClientSocketFactory, Serializable {
22: public Socket createSocket(String host, int port)
23: throws IOException {
24: return SSLSocketFactory.getDefault().createSocket(host, port);
25: }
26:
27: public boolean equals(Object obj) {
28: if (obj == null)
29: return false;
30: if (this == obj)
31: return true;
32: return getClass() == obj.getClass();
33: }
34:
35: public int hashCode() {
36: return 13;
37: }
38: }
|