Browse Source

removed test classes; added client and server app classes

develop
Robin Thoni 8 years ago
parent
commit
417e382d3b

+ 12
- 0
client/src/main/java/com/uqac/rthoni/com/java_rmi/client/ClientApplication.java View File

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 View File

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 View File

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 View File

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 View File

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 View File

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

Loading…
Cancel
Save