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) {
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() {
}
}
+ 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 {
}
- 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;
- }
- }
+
}