FileDocCategorySizeDatePackage
SSLSocket_RMIClientSocketFactory.javaAPI DocExample1325Thu Nov 08 00:23:24 GMT 2001com.ora.rmibook.chapter18.sockets

SSLSocket_RMIClientSocketFactory

public class SSLSocket_RMIClientSocketFactory extends Object implements Serializable, RMIClientSocketFactory

Fields Summary
public static String
ANON_CIPHER
public static String[]
CIPHERS
private int
_hashCode
Constructors Summary
Methods Summary
public java.net.SocketcreateSocket(java.lang.String host, int port)

          
        try {
            java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
            SSLSocketFactory socketFactory = (SSLSocketFactory) SSLSocketFactory.getDefault();
            SSLSocket returnValue = (SSLSocket) socketFactory.createSocket(host, port);

            returnValue.setEnabledCipherSuites(CIPHERS);
            return returnValue;
        } catch (Exception ignored) {
            ignored.printStackTrace();
        }
        return null;
    
public booleanequals(java.lang.Object object)

        if (object instanceof SSLSocket_RMIClientSocketFactory) {
            return true;
        }
        return false;
    
public inthashCode()

        return _hashCode;