Search in sources :

Example 1 with ATracingConnectionListener

use of port.ATracingConnectionListener in project GIPC by pdewan.

the class ACounterSessionMember method addListeners.

protected static void addListeners() {
    groupRPCSessionPort.addConnectionListener(new ATracingConnectionListener(groupRPCSessionPort));
    groupRPCSessionPort.addReceiveListener(new AMultiLayeServerReceiveListener(counter));
}
Also used : AMultiLayeServerReceiveListener(examples.gipc.counter.layers.AMultiLayeServerReceiveListener) ATracingConnectionListener(port.ATracingConnectionListener)

Example 2 with ATracingConnectionListener

use of port.ATracingConnectionListener in project GIPC by pdewan.

the class ASimpleGIPCCounterClient method init.

public static void init(String aClientName) {
    ACachingAbstractRPCProxyInvocationHandler.setInvokeObjectMethodsRemotely(false);
    gipcRegistry = GIPCLocateRegistry.getRegistry(SERVER_HOST_NAME, SERVER_PORT, aClientName);
    if (gipcRegistry == null) {
        System.err.println("Could not connect to server :" + SERVER_HOST_NAME + ":" + SERVER_PORT);
        System.exit(-1);
    }
    counter = (DistributedRMICounter) gipcRegistry.lookup(DistributedRMICounter.class, COUNTER_NAME);
    gipcRegistry.getInputPort().addConnectionListener(new ATracingConnectionListener(gipcRegistry.getInputPort()));
}
Also used : ATracingConnectionListener(port.ATracingConnectionListener)

Example 3 with ATracingConnectionListener

use of port.ATracingConnectionListener in project GIPC by pdewan.

the class ASimpleGIPCRegistryAndCounterServer method init.

protected static void init() {
    gipcRegistry = GIPCLocateRegistry.createRegistry(SERVER_PORT);
    counter = new ADistributedInheritingRMICounter();
    gipcRegistry.rebind(COUNTER_NAME, counter);
    gipcRegistry.getInputPort().addConnectionListener(new ATracingConnectionListener(gipcRegistry.getInputPort()));
}
Also used : ADistributedInheritingRMICounter(examples.mvc.rmi.duplex.ADistributedInheritingRMICounter) ATracingConnectionListener(port.ATracingConnectionListener)

Aggregations

ATracingConnectionListener (port.ATracingConnectionListener)3 AMultiLayeServerReceiveListener (examples.gipc.counter.layers.AMultiLayeServerReceiveListener)1 ADistributedInheritingRMICounter (examples.mvc.rmi.duplex.ADistributedInheritingRMICounter)1