Class SSLRMIServerSocketFactory

  • All Implemented Interfaces:
    java.rmi.server.RMIServerSocketFactory

    public class SSLRMIServerSocketFactory
    extends java.lang.Object
    implements java.rmi.server.RMIServerSocketFactory
    Instances of this class are used by the RMI to obtain SSL server sockets for RMI calls. This class implements RMIServerSocketFactory interface.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.net.ServerSocket createServerSocket​(int aPort)
      Create a server socket on the specified port (port 0 indicates an anonymous port).
      boolean equals​(java.lang.Object obj)
      Indicates whether some other object is "equal to" this one.
      static java.security.Principal getLocalThreadPrincipal()
      Gets the local thread principal.
      int hashCode()
      Returns a hash code value for the object.
      protected static void setLocalThreadSocket​(java.net.Socket aSocket)
      Sets the local thread socket.
      • Methods inherited from class java.lang.Object

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

      • SSLRMIServerSocketFactory

        public SSLRMIServerSocketFactory()
        Creates SSLRMIServerSocketFactory object.
      • SSLRMIServerSocketFactory

        public SSLRMIServerSocketFactory​(BindAddressPolicy bindAddrPol)
        Creates SSLRMIServerSocketFactory object.
        Parameters:
        bindAddrPol - Object for obtaining the bind addresses from.
      • SSLRMIServerSocketFactory

        public SSLRMIServerSocketFactory​(boolean aUseCustomSecuritySettings)
                                  throws java.lang.Exception
        Creates SSLRMIServerSocketFactory object with specified or not use of custom settings.
        Parameters:
        aUseCustomSecuritySettings - whether to use custom security settings or not
        Throws:
        java.lang.Exception - if the security protocol is not available in the default provider package or any of the other provider packages that were searched.
      • SSLRMIServerSocketFactory

        public SSLRMIServerSocketFactory​(boolean aUseCustomSecuritySettings,
                                         BindAddressPolicy bindAddrPol)
                                  throws java.lang.Exception
        Creates SSLRMIServerSocketFactory object with specified or not use of custom settings.
        Parameters:
        aUseCustomSecuritySettings - whether to use custom security settings or not
        bindAddrPol - Object for obtaining the bind addresses from.
        Throws:
        java.lang.Exception - if the security protocol is not available in the default provider package or any of the other provider packages that were searched.
      • SSLRMIServerSocketFactory

        public SSLRMIServerSocketFactory​(boolean aUseCustomSecuritySettings,
                                         boolean isTDIServerSide)
                                  throws java.lang.Exception
        Creates SSLRMIServerSocketFactory object with specified or not use of custom settings and stash.
        Parameters:
        aUseCustomSecuritySettings - whether to use custom security settings or not
        isTDIServerSide - Whether the code is executing on the side of the Directory Integrator Server. False means that the code is executing on a Server API client.
        Throws:
        java.lang.Exception - if the security protocol is not available in the default provider package or any of the other provider packages that were searched.
      • SSLRMIServerSocketFactory

        public SSLRMIServerSocketFactory​(boolean aUseCustomSecuritySettings,
                                         boolean isTDIServerSide,
                                         BindAddressPolicy bindAddrPol)
                                  throws java.lang.Exception
        Creates SSLRMIServerSocketFactory object with specified or not use of custom settings and stash.
        Parameters:
        aUseCustomSecuritySettings - whether to use custom security settings or not
        isTDIServerSide - Whether the code is executing on the side of the Directory Integrator Server. False means that the code is executing on a Server API client.
        bindAddrPol - Object for obtaining the bind addresses from.
        Throws:
        java.lang.Exception - if the security protocol is not available in the default provider package or any of the other provider packages that were searched.
    • Method Detail

      • setLocalThreadSocket

        protected static void setLocalThreadSocket​(java.net.Socket aSocket)
        Sets the local thread socket.
        Parameters:
        aSocket - Socket object
      • getLocalThreadPrincipal

        public static java.security.Principal getLocalThreadPrincipal()
                                                               throws java.lang.Exception
        Gets the local thread principal.
        Returns:
        subject distinguished name of the peer's own certificate.
        Throws:
        java.lang.Exception - if local thread socket or SSL socket session are null, or SSL session certificate chain is empty.
      • createServerSocket

        public java.net.ServerSocket createServerSocket​(int aPort)
                                                 throws java.io.IOException
        Create a server socket on the specified port (port 0 indicates an anonymous port).
        Specified by:
        createServerSocket in interface java.rmi.server.RMIServerSocketFactory
        Parameters:
        aPort - the port number
        Returns:
        the server socket on the specified port
        Throws:
        java.io.IOException
      • 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 hash codes; false otherwise.
      • hashCode

        public int hashCode()
        Returns a hash code value for the object.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        a hash code value for this object.