IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
 
[Sommaire]  [Top 50]  [F.A.Q.]  [ Java SE ]  [ Java EE ]  [Javadoc standard]  [Contact]
[ 1.4.2 ]  [ 5.0 ]  [ 6.0
Rechercher   
Dans
Options   sensible à la casse
étendre la recherche aux descriptions
Préférences
fr en 
 
Moteurs de recherche
JavaTM 2 Platform Std. Ed. v1.5.0

javax.rmi.ssl
Class SslRMIClientSocketFactory

java.lang.Object
  extended by javax.rmi.ssl.SslRMIClientSocketFactory
All Implemented Interfaces:
Serializable, RMIClientSocketFactory

public class SslRMIClientSocketFactory
extends Object
implements RMIClientSocketFactory, Serializable

An SslRMIClientSocketFactory instance is used by the RMI runtime in order to obtain client sockets for RMI calls via SSL.

This class implements RMIClientSocketFactory over the Secure Sockets Layer (SSL) or Transport Layer Security (TLS) protocols.

This class creates SSL sockets using the default SSLSocketFactory (see SSLSocketFactory.getDefault()). All instances of this class are functionally equivalent. In particular, they all share the same truststore, and the same keystore when client authentication is required by the server. This behavior can be modified in subclasses by overriding the createSocket(String,int) method; in that case, equals and hashCode may also need to be overridden.

If the system property javax.rmi.ssl.client.enabledCipherSuites is specified, the createSocket(String,int) method will call SSLSocket.setEnabledCipherSuites(String[]) before returning the socket. The value of this system property is a string that is a comma-separated list of SSL/TLS cipher suites to enable.

If the system property javax.rmi.ssl.client.enabledProtocols is specified, the createSocket(String,int) method will call SSLSocket.setEnabledProtocols(String[]) before returning the socket. The value of this system property is a string that is a comma-separated list of SSL/TLS protocol versions to enable.

Since:
1.5
See Also:
SSLSocketFactory, SslRMIServerSocketFactory, Serialized Form

Constructor Summary
SslRMIClientSocketFactory()
          Creates a new SslRMIClientSocketFactory.
 
Method Summary
 Socket createSocket(String host, int port)
          Creates an SSL socket.
 boolean equals(Object obj)
          Indicates whether some other object is "equal to" this one.
 int hashCode()
          Returns a hash code value for this SslRMIClientSocketFactory.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SslRMIClientSocketFactory

public SslRMIClientSocketFactory()

Creates a new SslRMIClientSocketFactory.

Method Detail

createSocket

public Socket createSocket(String host,
                           int port)
                    throws IOException

Creates an SSL socket.

If the system property javax.rmi.ssl.client.enabledCipherSuites is specified, this method will call SSLSocket.setEnabledCipherSuites(String[]) before returning the socket. The value of this system property is a string that is a comma-separated list of SSL/TLS cipher suites to enable.

If the system property javax.rmi.ssl.client.enabledProtocols is specified, this method will call SSLSocket.setEnabledProtocols(String[]) before returning the socket. The value of this system property is a string that is a comma-separated list of SSL/TLS protocol versions to enable.

Specified by:
createSocket in interface RMIClientSocketFactory
Parameters:
host - the host name
port - the port number
Returns:
a socket connected to the specified host and port.
Throws:
IOException - if an I/O error occurs during socket creation

equals

public boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

Because all instances of this class are functionally equivalent (they all use the default SSLSocketFactory), this method simply returns this.getClass().equals(obj.getClass()).

A subclass should override this method (as well as hashCode()) if its instances are not all functionally equivalent.

Overrides:
equals in class Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Object.hashCode(), Hashtable

hashCode

public int hashCode()

Returns a hash code value for this SslRMIClientSocketFactory.

Overrides:
hashCode in class Object
Returns:
a hash code value for this SslRMIClientSocketFactory.
See Also:
Object.equals(java.lang.Object), Hashtable

Copyright 2003 Sun Microsystems, Inc. All rights reserved