Merge branch 'master' of https://xp-dev.com/git/RRRRHHHH_Code
[RRRRHHHH_Code] / ruralHouses / src / launcher / RMILauncher.java
index f5a4cf8..c76316a 100644 (file)
@@ -4,13 +4,14 @@ import java.rmi.Naming;
 import java.rmi.RMISecurityManager;
 import java.rmi.Remote;
 
+import businessLogic.AccountManager;
 import businessLogic.AdminManager;
 import businessLogic.BookingManager;
 import businessLogic.HouseManager;
 import businessLogic.LoginManager;
 import businessLogic.OfferManager;
-import businessLogic.OwnerManager;
 
+@SuppressWarnings("deprecation")
 public class RMILauncher {
 
        public static void main(String[] args) {
@@ -35,15 +36,15 @@ public class RMILauncher {
                boolean bok = runBooking();
                boolean hou = runHouse();
                boolean off = runOffer();
-               boolean own = runOwner();
                boolean log = runLogin();
+               boolean acc = runAccount();
 
                System.out.println("  Admin: "+adm+
                                                        "\t Booking:  "+bok+
                                                        "\t House:  "+hou+
                                                        "\t Login:  "+log+
                                                        "\t Offer:  "+off+
-                                                       "\t Owner:  "+own);
+                                                       "\t Account: "+acc);
        }
        
        private static boolean runAdmin() {
@@ -58,6 +59,17 @@ public class RMILauncher {
                }
        }
 
+       private static boolean runAccount() {
+               try {
+                       Remote remoteObject = new AccountManager();
+                       String authService = "rmi://localhost:9999//AcM";
+                       Naming.rebind(authService, remoteObject);
+                       return true;
+               } catch (Exception e) {
+                       System.out.println(e.toString());
+                       return false;
+               }
+       }
        
        private static boolean runBooking() {
                try {
@@ -111,17 +123,7 @@ public class RMILauncher {
        }
 
        
-       private static boolean runOwner() {
-               try {
-                       Remote remoteOwner = new OwnerManager();
-                       String authService = "rmi://localhost:9999//OwM";
-                       Naming.rebind(authService, remoteOwner);
-                       return true;
-               } catch (Exception e) {
-                       System.out.println(e.toString());
-                       return false;
-               }
-       }
+
        
        
 }