- java.lang.Object
- 
- javax.rmi.ssl.SslRMIClientSocketFactory
 
- 
- All Implemented Interfaces:
- Serializable,- RMIClientSocketFactory
 
 
 public class SslRMIClientSocketFactory extends Object implements RMIClientSocketFactory, Serializable An SslRMIClientSocketFactoryinstance is used by the RMI runtime in order to obtain client sockets for RMI calls via SSL.This class implements RMIClientSocketFactoryover 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,equalsandhashCodemay also need to be overridden.If the system property javax.rmi.ssl.client.enabledCipherSuitesis 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.enabledProtocolsis 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 SummaryConstructors Constructor Description SslRMIClientSocketFactory()Creates a newSslRMIClientSocketFactory.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description SocketcreateSocket(String host, int port)Creates an SSL socket.booleanequals(Object obj)Indicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for thisSslRMIClientSocketFactory.
 
- 
- 
- 
Method Detail- 
createSocketpublic Socket createSocket(String host, int port) throws IOException Creates an SSL socket. If the system property javax.rmi.ssl.client.enabledCipherSuitesis 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.enabledProtocolsis 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:
- createSocketin 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
 
 - 
equalspublic 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:
- equalsin class- Object
- Parameters:
- obj- the reference object with which to compare.
- Returns:
- trueif this object is the same as the obj argument;- falseotherwise.
- See Also:
- Object.hashCode(),- HashMap
 
 - 
hashCodepublic int hashCode() Returns a hash code value for this SslRMIClientSocketFactory.- Overrides:
- hashCodein class- Object
- Returns:
- a hash code value for this
 SslRMIClientSocketFactory.
- See Also:
- Object.equals(java.lang.Object),- System.identityHashCode(java.lang.Object)
 
 
- 
 
-