Переглянути джерело

removed test classes; added client and server app classes

develop
Robin Thoni 8 роки тому
джерело
коміт
417e382d3b

+ 12
- 0
client/src/main/java/com/uqac/rthoni/com/java_rmi/client/ClientApplication.java Переглянути файл

@@ -0,0 +1,12 @@
1
+package com.uqac.rthoni.com.java_rmi.client;
2
+
3
+/**
4
+ * Created by robin on 9/15/16.
5
+ */
6
+public class ClientApplication {
7
+
8
+    public static void run(String host, int port, String inputFile, String outputFile)
9
+    {
10
+        System.out.println(String.format("Connecting to %1s:%2d...", host, port));
11
+    }
12
+}

+ 0
- 10
client/src/main/java/com/uqac/rthoni/com/java_rmi/client/ClientTestClass.java Переглянути файл

@@ -1,10 +0,0 @@
1
-package com.uqac.rthoni.com.java_rmi.client;
2
-
3
-import com.uqac.rthoni.java_rmi.common.CommonTestClass;
4
-
5
-/**
6
- * Created by robin on 9/15/16.
7
- */
8
-public class ClientTestClass {
9
-    CommonTestClass t;
10
-}

+ 0
- 7
common/src/main/java/com/uqac/rthoni/java_rmi/common/CommonTestClass.java Переглянути файл

@@ -1,7 +0,0 @@
1
-package com.uqac.rthoni.java_rmi.common;
2
-
3
-/**
4
- * Created by robin on 9/15/16.
5
- */
6
-public class CommonTestClass {
7
-}

+ 13
- 0
server/src/main/java/com/uqac/rthoni/com/java_rmi/server/ServerApplication.java Переглянути файл

@@ -0,0 +1,13 @@
1
+package com.uqac.rthoni.com.java_rmi.server;
2
+
3
+/**
4
+ * Created by robin on 9/15/16.
5
+ */
6
+public class ServerApplication {
7
+
8
+    public static void run(int port, String sourceDir, String classDir, String logFile)
9
+    {
10
+        String ip = "0.0.0.0";
11
+        System.out.println(String.format("Listening for clients on %1s:%2d...", ip, port));
12
+    }
13
+}

+ 0
- 10
server/src/main/java/com/uqac/rthoni/com/java_rmi/server/ServerTestClass.java Переглянути файл

@@ -1,10 +0,0 @@
1
-package com.uqac.rthoni.com.java_rmi.server;
2
-
3
-import com.uqac.rthoni.java_rmi.common.CommonTestClass;
4
-
5
-/**
6
- * Created by robin on 9/15/16.
7
- */
8
-public class ServerTestClass {
9
-    CommonTestClass t;
10
-}

+ 5
- 2
src/main/java/com/uqac/rthoni/java_rmi/Main.java Переглянути файл

@@ -1,5 +1,8 @@
1 1
 package com.uqac.rthoni.java_rmi;
2 2
 
3
+import com.uqac.rthoni.com.java_rmi.client.ClientApplication;
4
+import com.uqac.rthoni.com.java_rmi.server.ServerApplication;
5
+
3 6
 import java.io.PrintStream;
4 7
 
5 8
 /**
@@ -63,7 +66,7 @@ public class Main {
63 66
             String classDir = args[3];
64 67
             String logFile = args[4];
65 68
 
66
-            System.out.println("Hello World! server");
69
+            ServerApplication.run(port, sourceDir, classDir, logFile);
67 70
         }
68 71
         else if (mode.equals("client")) {
69 72
             String host = args[1];
@@ -71,7 +74,7 @@ public class Main {
71 74
             String inputFile = args[3];
72 75
             String outputFile = args[4];
73 76
 
74
-            System.out.println("Hello World! client");
77
+            ClientApplication.run(host, port, inputFile, outputFile);
75 78
         }
76 79
         else {
77 80
             usage(name, true);

Завантаження…
Відмінити
Зберегти