psdi.server

Class MXRMISocketFactory

  • java.lang.Object
    • java.rmi.server.RMISocketFactory
      • psdi.server.MXRMISocketFactory
  • All Implemented Interfaces:
    java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory


    public class MXRMISocketFactory
    extends java.rmi.server.RMISocketFactory
    This is an extension to RMISocketFactory to intercept the socket creation request. This class intercepts the createServerSocket method and instead of choosing an arbitrary port uses the port number specified in the MXServer.properties file. This class is used only by the server and not anywhere else.

    See Also:
    java.rmi.server
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.net.ServerSocket createServerSocket(int port)
      Intercepts port=0 (anonymous port) and sets to RMIPORT.
      java.net.Socket createSocket(java.lang.String host, int port) 
      • Methods inherited from class java.rmi.server.RMISocketFactory

        getDefaultSocketFactory, getFailureHandler, getSocketFactory, setFailureHandler, setSocketFactory
      • Methods inherited from class java.lang.Object

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

      • MXRMISocketFactory

        public MXRMISocketFactory()
    • Method Detail

      • createSocket

        public java.net.Socket createSocket(java.lang.String host,
                                            int port)
                                     throws java.io.IOException
        Specified by:
        createSocket in interface java.rmi.server.RMIClientSocketFactory
        Specified by:
        createSocket in class java.rmi.server.RMISocketFactory
        Throws:
        java.io.IOException
      • createServerSocket

        public java.net.ServerSocket createServerSocket(int port)
                                                 throws java.io.IOException
        Intercepts port=0 (anonymous port) and sets to RMIPORT. RMIPORT can be set through the server properties file property mxe.rmi.port
        Specified by:
        createServerSocket in interface java.rmi.server.RMIServerSocketFactory
        Specified by:
        createServerSocket in class java.rmi.server.RMISocketFactory
        Throws:
        java.io.IOException