Class FixedPortRmiSocketFactory

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

    public final class FixedPortRmiSocketFactory
    extends java.rmi.server.RMISocketFactory
    implements java.rmi.server.RMIServerSocketFactory
    Created by andrey on 15.07.17.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      int fixedPort  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.net.ServerSocket createServerSocket​(int port)  
      java.net.Socket createSocket​(java.lang.String host, int port)  
      void setFixedPort​(int fixedPort)  
      • 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
    • Field Detail

      • fixedPort

        public int fixedPort
    • Constructor Detail

      • FixedPortRmiSocketFactory

        public FixedPortRmiSocketFactory​(int fixedPort)
    • Method Detail

      • setFixedPort

        public final void setFixedPort​(int fixedPort)
      • createSocket

        public final 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 final java.net.ServerSocket createServerSocket​(int port)
                                                       throws java.io.IOException
        Specified by:
        createServerSocket in interface java.rmi.server.RMIServerSocketFactory
        Specified by:
        createServerSocket in class java.rmi.server.RMISocketFactory
        Throws:
        java.io.IOException