1 | try { |
2 | control = new RMIClientControlImpl(thisClient); |
3 | identity= "rmi://jojo.npac.syr.edu:7000/" + thisClient.clientName; Naming.rebind(identity, control); System.out.println("ClientControl Export done."); |
4 | } catch (RemoteException re) { System.out.println("Exception in ClientControlImpl.main: " + re); } |
5 | catch (MalformedURLException e) { |
6 | System.out.println("MalformedURLException CoordinatorImpl.main: " + e); |
7 | } |
8 | try { int id= thisClient._chatBahn.register(thisClient.clientName, control); |
9 | thisClient.clientID=id; |
10 | System.out.println("Registration Succeeded"); |
11 | } catch (jdceRMIBahnException e) { |
12 | System.out.println(e.typeToString(e.getType())); |
13 | System.out.println("Registration Failed"); } |
14 | catch (jdceRMIClientException e){} |
15 | catch (RemoteException e) { |
16 | System.out.println("OPOOOOuch!!"); |
17 | } |
18 | } |