Search in sources :

Example 1 with GIPCRegistry

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();
    }
}
Also used : GIPCRegistry(inputport.rpc.GIPCRegistry)

Example 2 with GIPCRegistry

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();
    }
}
Also used : DistributedRMICounter(examples.mvc.rmi.duplex.DistributedRMICounter) ADistributedInheritingRMICounter(examples.mvc.rmi.duplex.ADistributedInheritingRMICounter) GIPCRegistry(inputport.rpc.GIPCRegistry)

Aggregations

GIPCRegistry (inputport.rpc.GIPCRegistry)2 ADistributedInheritingRMICounter (examples.mvc.rmi.duplex.ADistributedInheritingRMICounter)1 DistributedRMICounter (examples.mvc.rmi.duplex.DistributedRMICounter)1