Cleaning up code for runtime, installer, RMI, compiler for the Java side
[iot2.git] / iotjava / iotruntime / slave / IoTSlave.java
index 1a6fa9f30090b878f9ee64ce229536f005f6debe..061de08ff4f2b18530490f8dce557ca2ef0fe391 100644 (file)
@@ -47,7 +47,7 @@ import net.lingala.zip4j.core.ZipFile;
  * @version     1.0
  * @since       2016-06-16
  */
-public class IoTSlave {
+public final class IoTSlave {
 
        /**
         * IoTSlave class properties
@@ -148,10 +148,10 @@ public class IoTSlave {
                        FileInputStream fis = new FileInputStream(file);
                        prop.load(fis);
                } catch (IOException ex) {
-                       System.out.println("IoTMaster: Error reading config file: " + strCfgFileName);
+                       RuntimeOutput.print("IoTMaster: Error reading config file: " + strCfgFileName, BOOL_VERBOSE);
                        ex.printStackTrace();
                }
-               System.out.println("IoTMaster: Extracting information from config file: " + strCfgFileName);
+               RuntimeOutput.print("IoTMaster: Extracting information from config file: " + strCfgFileName, BOOL_VERBOSE);
                // Initialize constants from config file
                STR_JAR_FILE_PATH = prop.getProperty("JAR_FILE_PATH");
                STR_OBJ_CLS_PFX = prop.getProperty("OBJECT_CLASS_PREFIX");
@@ -165,13 +165,13 @@ public class IoTSlave {
                        CAPAB_BASED_RMI = true;
                }
 
-               System.out.println("JAR_FILE_PATH=" + STR_JAR_FILE_PATH);
-               System.out.println("OBJECT_CLASS_PREFIX=" + STR_OBJ_CLS_PFX);
-               System.out.println("INTERFACE_PREFIX=" + STR_INTERFACE_PFX);
-               System.out.println("SKEL_CLASS_SUFFIX=" + SKEL_CLASS_SUFFIX);
-               System.out.println("STUB_CLASS_SUFFIX=" + STUB_CLASS_SUFFIX);
-               System.out.println("CAPAB_BASED_RMI=" + CAPAB_BASED_RMI);
-               System.out.println("IoTMaster: Information extracted successfully!");
+               RuntimeOutput.print("JAR_FILE_PATH=" + STR_JAR_FILE_PATH, BOOL_VERBOSE);
+               RuntimeOutput.print("OBJECT_CLASS_PREFIX=" + STR_OBJ_CLS_PFX, BOOL_VERBOSE);
+               RuntimeOutput.print("INTERFACE_PREFIX=" + STR_INTERFACE_PFX, BOOL_VERBOSE);
+               RuntimeOutput.print("SKEL_CLASS_SUFFIX=" + SKEL_CLASS_SUFFIX, BOOL_VERBOSE);
+               RuntimeOutput.print("STUB_CLASS_SUFFIX=" + STUB_CLASS_SUFFIX, BOOL_VERBOSE);
+               RuntimeOutput.print("CAPAB_BASED_RMI=" + CAPAB_BASED_RMI, BOOL_VERBOSE);
+               RuntimeOutput.print("IoTMaster: Information extracted successfully!", BOOL_VERBOSE);
        }
 
        /**
@@ -777,8 +777,6 @@ public class IoTSlave {
                        inStream.close();
                        socket.close();
                        RuntimeOutput.print("IoTSlave: Closing!", BOOL_VERBOSE);
-                       // We have to continuously loop because we are preserving our stubs and skeletons
-                       //while(true) { }
 
                } catch (IOException               |
                                 ClassNotFoundException    |