Module java.rmi
Package javax.rmi.ssl

Class SslRMIClientSocketFactory

    • 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(), HashMap

微信小程序

微信扫一扫体验

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部