Class AvailablePortFinder


  • @Deprecated
    public final class AvailablePortFinder
    extends Object
    Deprecated.
    Finds currently available server ports.
    • Method Detail

      • getNextAvailable

        public static int getNextAvailable()
        Deprecated.
        Gets the next available port.
        Returns:
        the available port
        Throws:
        IllegalStateException - if there are no ports available
      • getNextAvailable

        public static int getNextAvailable​(int fromPort,
                                           int toPort)
        Deprecated.
        Gets the next available port in the given range.
        Parameters:
        fromPort - port number start range.
        toPort - port number end range.
        Returns:
        the available port
        Throws:
        IllegalStateException - if there are no ports available