Search in sources :

Example 1 with ACounter

use of examples.mvc.local.duplex.ACounter in project GIPC by pdewan.

the class AnEchoingDuplexRPCClientLauncher method registerRemoteObjects.

protected void registerRemoteObjects() {
    DuplexRPCClientInputPort aDuplexRPCClientInputPort = (DuplexRPCClientInputPort) mainPort;
    counter = new ACounter();
    aDuplexRPCClientInputPort.register(counter);
}
Also used : DuplexRPCClientInputPort(inputport.rpc.duplex.DuplexRPCClientInputPort) ACounter(examples.mvc.local.duplex.ACounter)

Example 2 with ACounter

use of examples.mvc.local.duplex.ACounter in project GIPC by pdewan.

the class ADuplexRPCClientMVCLauncher method registerRemoteObjects.

// protected  void createProxies() {
// upperCaseProxy = (DuplexUpperCaser) DirectedRPCProxyGenerator.generateRPCProxy((DuplexRPCClientInputPort) mainPort,
// registeredUpperCaserClass());
// }
protected void registerRemoteObjects() {
    DuplexRPCClientInputPort aDuplexRPCClientInputPort = (DuplexRPCClientInputPort) mainPort;
    counter = new ACounter();
    aDuplexRPCClientInputPort.register(counter);
}
Also used : DuplexRPCClientInputPort(inputport.rpc.duplex.DuplexRPCClientInputPort) ACounter(examples.mvc.local.duplex.ACounter)

Example 3 with ACounter

use of examples.mvc.local.duplex.ACounter in project GIPC by pdewan.

the class ADuplexCounterServerLauncher method registerRemoteObjects.

@Override
protected void registerRemoteObjects() {
    register(COUNTER1, new ACounter());
    register(COUNTER2, new ACounter());
}
Also used : ACounter(examples.mvc.local.duplex.ACounter)

Example 4 with ACounter

use of examples.mvc.local.duplex.ACounter in project GIPC by pdewan.

the class ASessionPortCounterClientLauncher method createUI.

@Override
protected void createUI(InputPort anInputPort) {
    Scanner aScanner = new Scanner(System.in);
    for (; ; ) {
        System.out.println("Enter user name whose counter is to be incremented:");
        String aName = aScanner.nextLine();
        Counter aCounter = (Counter) DirectedRPCProxyGenerator.generateRPCProxy((DuplexRPCSessionPort) mainPort, aName, ACounter.class, null);
        aCounter.increment(1);
        System.out.println("New counter value:" + aCounter.getValue());
    }
}
Also used : Scanner(java.util.Scanner) Counter(examples.mvc.local.duplex.Counter) ACounter(examples.mvc.local.duplex.ACounter) ACounter(examples.mvc.local.duplex.ACounter) DuplexRPCSessionPort(sessionport.rpc.duplex.DuplexRPCSessionPort)

Aggregations

ACounter (examples.mvc.local.duplex.ACounter)4 DuplexRPCClientInputPort (inputport.rpc.duplex.DuplexRPCClientInputPort)2 Counter (examples.mvc.local.duplex.Counter)1 Scanner (java.util.Scanner)1 DuplexRPCSessionPort (sessionport.rpc.duplex.DuplexRPCSessionPort)1