use of examples.mvc.rmi.duplex.DistributedRMICounter in project GIPC by pdewan.
the class AMultiUserRMIUpperCaser method getCounterProxy.
protected DistributedRMICounter getCounterProxy(String aUserName) {
try {
DistributedRMICounter counter = nameToCounter.get(aUserName);
if (counter == null) {
Registry rmiRegistry = LocateRegistry.getRegistry();
counter = (DistributedRMICounter) rmiRegistry.lookup(aUserName + DistributedRMICounter.class.getName());
nameToCounter.put(aUserName, counter);
}
return counter;
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
Aggregations