- java.lang.Object
-
- 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
(seeSSLSocketFactory.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 thecreateSocket(String,int)
method; in that case,equals
andhashCode
may also need to be overridden.If the system property
javax.rmi.ssl.client.enabledCipherSuites
is specified, thecreateSocket(String,int)
method will callSSLSocket.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, thecreateSocket(String,int)
method will callSSLSocket.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
Constructors Constructor and Description SslRMIClientSocketFactory()
Creates a newSslRMIClientSocketFactory
.
-
-
-
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 callSSLSocket.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 callSSLSocket.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 interfaceRMIClientSocketFactory
- Parameters:
host
- the host nameport
- 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 returnsthis.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 classObject
- 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()
,HashMap
-
hashCode
public int hashCode()
Returns a hash code value for this
SslRMIClientSocketFactory
.- Overrides:
hashCode
in classObject
- Returns:
- a hash code value for this
SslRMIClientSocketFactory
. - See Also:
Object.equals(java.lang.Object)
,System.identityHashCode(java.lang.Object)
-
-
Traduction non disponible
Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Version en cache
21/11/2024 21:49:42 Cette version de la page est en cache (à la date du 21/11/2024 21:49:42) afin d'accélérer le traitement. Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la dernère version de la page.Document créé le 01/09/2006, dernière modification le 04/03/2020
Source du document imprimé : https://www.gaudry.be/java-api-rf-javax/rmi/ssl/sslrmiclientsocketfactory.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.