Class SSLRMIClientSocketFactory

  • All Implemented Interfaces:
    java.io.Serializable, java.rmi.server.RMIClientSocketFactory

    public class SSLRMIClientSocketFactory
    extends java.lang.Object
    implements java.rmi.server.RMIClientSocketFactory, java.io.Serializable
    Instances of this class are used by the RMI to obtain SSL client sockets for RMI calls. This class implements RMIClientSocketFactory class.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int SSL_PROPERTIES_CLIENT_DEFINED
      Whether to check for the use of user custom security settings
      static int SSL_PROPERTIES_SERVER_DEFINED
      if a server is defined and no SSL connection needed, a socket is created without additional initialization
    • Constructor Summary

      Constructors 
      Constructor Description
      SSLRMIClientSocketFactory​(int aSSLProperties)
      Creates SSLRMIClientSocketFactory
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.net.Socket createSocket​(java.lang.String host, int port)
      Creates a client socket connected to the specified host and port if SSLSocketFactory is not initialized
      boolean equals​(java.lang.Object obj)
      Indicates whether some other object is "equal to" this one.
      int hashCode()
      Returns a hash code value for the object.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • SSL_PROPERTIES_CLIENT_DEFINED

        public static final int SSL_PROPERTIES_CLIENT_DEFINED
        Whether to check for the use of user custom security settings
        See Also:
        Constant Field Values
      • SSL_PROPERTIES_SERVER_DEFINED

        public static final int SSL_PROPERTIES_SERVER_DEFINED
        if a server is defined and no SSL connection needed, a socket is created without additional initialization
        See Also:
        Constant Field Values
    • Constructor Detail

      • SSLRMIClientSocketFactory

        public SSLRMIClientSocketFactory​(int aSSLProperties)
        Creates SSLRMIClientSocketFactory
        Parameters:
        aSSLProperties - Client socket factory SSL properties
    • Method Detail

      • createSocket

        public java.net.Socket createSocket​(java.lang.String host,
                                            int port)
                                     throws java.io.IOException
        Creates a client socket connected to the specified host and port if SSLSocketFactory is not initialized
        Specified by:
        createSocket in interface java.rmi.server.RMIClientSocketFactory
        Parameters:
        host - the host name
        port - the port name
        Returns:
        a socket connected to the specified host and port.
        Throws:
        java.io.IOException - if an I/O error occurs during socket creation
      • equals

        public boolean equals​(java.lang.Object obj)
        Indicates whether some other object is "equal to" this one.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - the reference object with which to compare.
        Returns:
        true if this object is the same as the obj argument and they have same SSL properties; false otherwise.
      • hashCode

        public int hashCode()
        Returns a hash code value for the object.

        For SSLRMIClientSocketFactory class the hash code is considered to be equal to the value the value of SSL properties.

        Overrides:
        hashCode in class java.lang.Object
        Returns:
        a hash code value for this object.