Class RMIExtendedSocketFactory

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

    public class RMIExtendedSocketFactory
    extends java.rmi.server.RMISocketFactory
    A RMISocketFactory implementation that creates ServerSockets bound on a specified network interface.
    • Constructor Summary

      Constructors 
      Constructor Description
      RMIExtendedSocketFactory()
      Default constructor.
      RMIExtendedSocketFactory​(java.lang.String hostIpAddress)
      Creates a new RMIExtendedSocketFactory which will create ServerSockets bound on the specified network interface.
      RMIExtendedSocketFactory​(java.net.InetAddress inetAddress)
      Creates a new RMIExtendedSocketFactory which will create ServerSockets bound on the specified network interface.
    • 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)  
      • 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

      • RMIExtendedSocketFactory

        public RMIExtendedSocketFactory()
        Default constructor. Bind the server sockets on all interfaces.
      • RMIExtendedSocketFactory

        public RMIExtendedSocketFactory​(java.net.InetAddress inetAddress)
        Creates a new RMIExtendedSocketFactory which will create ServerSockets bound on the specified network interface.
        Parameters:
        inetAddress - The InetAddress of the network interface.
      • RMIExtendedSocketFactory

        public RMIExtendedSocketFactory​(java.lang.String hostIpAddress)
                                 throws java.net.UnknownHostException
        Creates a new RMIExtendedSocketFactory which will create ServerSockets bound on the specified network interface.
        Parameters:
        hostIpAddress - The IP address of the interface to bind the server sockets to.
        Throws:
        java.net.UnknownHostException - If an invalid IP address is provided.
    • Method Detail

      • createServerSocket

        public 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
      • 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