public MasterManager(PreferencesManager prefManager) throws IOException {
   this.prefManager = prefManager;
   dbManager =
       new DatabaseManager("C:\\Program Files\\MySQL\\MySQL Server 5.6", "experiment", false);
   cManager =
       new CommunicationManager(
           prefManager.getPreference("SLAVE_IP_ADDRESS"),
           Integer.parseInt(prefManager.getPreference("OUT_PORT")),
           Integer.parseInt(prefManager.getPreference("IN_PORT")));
 }
 private void setupExperiments() {
   File expFile = null;
   BufferedReader reader = null;
   String readed;
   String[] splitted;
   Experiment exp;
   try {
     expList = new LinkedList<Experiment>();
     expFile = new File(prefManager.getPreference("EXPERIMENT_FILE"));
     reader = new BufferedReader(new FileReader(expFile));
     while (reader.ready()) {
       readed = reader.readLine();
       if (readed != null && readed.length() > 0 && !readed.startsWith("workload_name")) {
         splitted = readed.split(",");
         if (splitted[0].endsWith(".xml")) {
           if (ExperimentType.valueOf(readed.split(",")[1]) != ExperimentType.TEST) {
             exp =
                 new Experiment(
                     new SoapXmlWorkload(
                         new File(
                             prefManager.getPreference("WORKLOAD_FOLDER") + "\\" + splitted[0]),
                         prefManager),
                     ExperimentType.valueOf(readed.split(",")[1]),
                     dbManager);
             if (!exp.canExecute()) expList.addAll(exp.getNeededTests(availableWorkloads));
             expList.add(exp);
             AppLogger.logInfo(
                 getClass(),
                 "Readed '"
                     + exp.getExpType().toString()
                     + "' experiment: "
                     + exp.getWorkload().getName());
           } else {
           } // TODO
         }
         System.out.print(".");
       }
     }
     reader.close();
   } catch (IOException ex) {
     AppLogger.logException(getClass(), ex, "Unable to load experiments");
   }
 }
 private void readWorkloads() {
   Workload currentWorkload;
   availableWorkloads = new LinkedList<Workload>();
   AppLogger.logOngoingInfo(getClass(), "Fetching workloads ");
   for (File wFile : new File(prefManager.getPreference("WORKLOAD_FOLDER")).listFiles()) {
     currentWorkload = null;
     try {
       if (wFile.getName().endsWith(".xml")
           && wFile.getName().toUpperCase().contains("WORKLOAD")) {
         currentWorkload = new SoapXmlWorkload(wFile, null);
       }
       if (currentWorkload != null) {
         availableWorkloads.add(currentWorkload);
         System.out.print(".");
       }
     } catch (Exception ex) {
       AppLogger.logError(
           getClass(), ex.getClass().getName(), "Unable to load workload: " + wFile.getName());
     }
   }
   System.out.println(" Available workloads: " + availableWorkloads.size());
 }