use of inputport.rpc.GIPCRegistry in project GIPC by pdewan.
the class AGIPCCounterClient method main.
public static void main(String[] args) {
try {
GIPCRegistry gipcRegistry = GIPCLocateRegistry.getRegistry(SERVER_HOST_NAME, SERVER_PORT, "client");
// test(gipcRegistry, DistributedRMICounter.class);
ACachingAbstractRPCProxyInvocationHandler.setInvokeObjectMethodsRemotely(true);
// test(gipcRegistry, DistributedRMICounter.class);
test(gipcRegistry, ADistributedInheritingRMICounter.class);
} catch (Exception e) {
e.printStackTrace();
}
}
use of inputport.rpc.GIPCRegistry in project GIPC by pdewan.
the class AGIPCCounterServer method main.
public static void main(String[] args) {
try {
GIPCRegistry gipcRegistry = GIPCLocateRegistry.createRegistry(SERVER_PORT);
DistributedRMICounter counter1 = new ADistributedInheritingRMICounter();
DistributedRMICounter counter2 = new ADistributedInheritingRMICounter();
gipcRegistry.rebind(COUNTER1, counter1);
gipcRegistry.rebind(COUNTER2, counter2);
DistributedRMICounter fetchedCounter = (DistributedRMICounter) gipcRegistry.lookup(DistributedRMICounter.class, COUNTER1);
AnRMICounterServer.doOperations(counter1, counter2, fetchedCounter);
} catch (Exception e) {
e.printStackTrace();
}
}
Aggregations