Interface Testing.Network

  • Enclosing interface:
    Testing

    public static interface Testing.Network
    Network-related utility methods.
    • Method Summary

      Static Methods 
      Modifier and Type Method Description
      static int getAvailablePort()
      Find a port that is available.
    • Method Detail

      • getAvailablePort

        static int getAvailablePort()
        Find a port that is available. This method starts a ServerSocket and obtains the port on which the socket is listening, and then shuts down the socket so the port becomes available.
        Returns:
        the number of the now-available port