Search in sources :

Example 1 with ADuplexRPCInputPortLauncherSupport

use of inputport.rpc.duplex.ADuplexRPCInputPortLauncherSupport in project GIPC by pdewan.

the class GIPCComparableCounterClient method main.

public static void main(String[] args) {
    try {
        (new ADuplexRPCInputPortLauncherSupport()).init();
        DuplexRPCClientInputPort aClientInputPort = DuplexRPCInputPortSelector.createDuplexRPCClientInputPort("localhost", SERVER_PORT, SERVER_NAME, "counter client");
        RPCProxyGenerator rpcProxyGenerator = aClientInputPort.getRPCProxyGenerator();
        ComparableCounter counter11 = (ComparableCounter) rpcProxyGenerator.generateRPCProxy(ComparableCounter.class, COUNTER1);
        ComparableCounter counter12 = (ComparableCounter) rpcProxyGenerator.generateRPCProxy(ComparableCounter.class, COUNTER1);
        ComparableCounter counter2 = (ComparableCounter) rpcProxyGenerator.generateRPCProxy(ComparableCounter.class, COUNTER2);
        aClientInputPort.connect();
        ComparableCounter greaterCounter = counter11.greater(counter11);
        System.out.println(greaterCounter == counter11);
        System.out.println(greaterCounter.equals(counter11));
        System.out.println(counter12 == counter11);
        System.out.println(counter12.equals(counter11));
        System.out.println(counter11.hashCode() == counter12.hashCode());
        System.out.println(greaterCounter.hashCode() == counter11.hashCode());
        System.out.println(counter11.equals(counter2));
    } catch (Exception e) {
        e.printStackTrace();
    }
}
Also used : ADuplexRPCInputPortLauncherSupport(inputport.rpc.duplex.ADuplexRPCInputPortLauncherSupport) DuplexRPCClientInputPort(inputport.rpc.duplex.DuplexRPCClientInputPort) RPCProxyGenerator(inputport.rpc.RPCProxyGenerator)

Example 2 with ADuplexRPCInputPortLauncherSupport

use of inputport.rpc.duplex.ADuplexRPCInputPortLauncherSupport in project GIPC by pdewan.

the class CopyOfAnAbstractPortLauncher method getDefaultPortLauncherSupport.

protected PortLauncherSupport getDefaultPortLauncherSupport() {
    PortLauncherSupport portLauncherSupport = null;
    portDescription = getPortDescription();
    if (portDescription != null) {
        portLauncherSupport = getPortLauncherSupport(portDescription);
    }
    if (portLauncherSupport != null)
        return portLauncherSupport;
    else
        return new ADuplexRPCInputPortLauncherSupport();
}
Also used : ADuplexRPCInputPortLauncherSupport(inputport.rpc.duplex.ADuplexRPCInputPortLauncherSupport) AGroupRPCInputPortLauncherSupport(inputport.rpc.group.AGroupRPCInputPortLauncherSupport) ASimplexObjectInputPortLauncherSupport(inputport.datacomm.simplex.object.ASimplexObjectInputPortLauncherSupport) ADuplexRPCInputPortLauncherSupport(inputport.rpc.duplex.ADuplexRPCInputPortLauncherSupport) AGroupObjectInputPortLauncherSupport(inputport.datacomm.group.object.AGroupObjectInputPortLauncherSupport) ADuplexObjectInputPortLauncherSupport(inputport.datacomm.duplex.object.ADuplexObjectInputPortLauncherSupport) ASimplexBufferInputPortLauncherSupport(inputport.datacomm.simplex.buffer.ASimplexBufferInputPortLauncherSupport) AGroupBufferInputPortLauncherSupport(inputport.datacomm.group.buffer.AGroupBufferInputPortLauncherSupport) ADuplexBufferInputPortLauncherSupport(inputport.datacomm.duplex.buffer.ADuplexBufferInputPortLauncherSupport) PortLauncherSupport(port.PortLauncherSupport)

Example 3 with ADuplexRPCInputPortLauncherSupport

use of inputport.rpc.duplex.ADuplexRPCInputPortLauncherSupport in project GIPC by pdewan.

the class AnAbstractPortLauncher method getDefaultPortLauncherSupport.

protected PortLauncherSupport getDefaultPortLauncherSupport() {
    PortLauncherSupport portLauncherSupport = null;
    portDescription = getPortDescription();
    if (portDescription != null) {
        portLauncherSupport = PortLauncherSupportRegistry.get(portDescription);
    }
    if (portLauncherSupport != null)
        return portLauncherSupport;
    else
        return new ADuplexRPCInputPortLauncherSupport();
}
Also used : ADuplexRPCInputPortLauncherSupport(inputport.rpc.duplex.ADuplexRPCInputPortLauncherSupport) AGroupRPCInputPortLauncherSupport(inputport.rpc.group.AGroupRPCInputPortLauncherSupport) ADuplexRPCInputPortLauncherSupport(inputport.rpc.duplex.ADuplexRPCInputPortLauncherSupport) AGroupObjectInputPortLauncherSupport(inputport.datacomm.group.object.AGroupObjectInputPortLauncherSupport) ADuplexObjectInputPortLauncherSupport(inputport.datacomm.duplex.object.ADuplexObjectInputPortLauncherSupport) ACausalGroupSessionPortLauncherSupport(port.causal.ACausalGroupSessionPortLauncherSupport) ASimplexObjectInputPortLauncherSupport(inputport.datacomm.simplex.object.ASimplexObjectInputPortLauncherSupport) ASimplexBufferInputPortLauncherSupport(inputport.datacomm.simplex.buffer.ASimplexBufferInputPortLauncherSupport) AGroupBufferInputPortLauncherSupport(inputport.datacomm.group.buffer.AGroupBufferInputPortLauncherSupport) ADuplexBufferInputPortLauncherSupport(inputport.datacomm.duplex.buffer.ADuplexBufferInputPortLauncherSupport) AClientDelayingPortLauncherSupport(port.delay.AClientDelayingPortLauncherSupport)

Example 4 with ADuplexRPCInputPortLauncherSupport

use of inputport.rpc.duplex.ADuplexRPCInputPortLauncherSupport in project GIPC by pdewan.

the class CopyOfAnAbstractPortLauncher method registerDefaultPortLauncherSupport.

protected void registerDefaultPortLauncherSupport() {
    put(new APortDescription(PortKind.CLIENT_INPUT_PORT, PortAccessKind.SIMPLEX, PortMessageKind.BUFFER), new ASimplexBufferInputPortLauncherSupport());
    put(new APortDescription(PortKind.SERVER_INPUT_PORT, PortAccessKind.SIMPLEX, PortMessageKind.BUFFER), new ASimplexBufferInputPortLauncherSupport());
    put(new APortDescription(PortKind.CLIENT_INPUT_PORT, PortAccessKind.SIMPLEX, PortMessageKind.OBJECT), new ASimplexObjectInputPortLauncherSupport());
    put(new APortDescription(PortKind.SERVER_INPUT_PORT, PortAccessKind.SIMPLEX, PortMessageKind.OBJECT), new ASimplexObjectInputPortLauncherSupport());
    put(new APortDescription(PortKind.CLIENT_INPUT_PORT, PortAccessKind.DUPLEX, PortMessageKind.BUFFER), new ADuplexBufferInputPortLauncherSupport());
    put(new APortDescription(PortKind.SERVER_INPUT_PORT, PortAccessKind.DUPLEX, PortMessageKind.BUFFER), new ADuplexBufferInputPortLauncherSupport());
    put(new APortDescription(PortKind.CLIENT_INPUT_PORT, PortAccessKind.DUPLEX, PortMessageKind.OBJECT), new ADuplexObjectInputPortLauncherSupport());
    put(new APortDescription(PortKind.SERVER_INPUT_PORT, PortAccessKind.DUPLEX, PortMessageKind.OBJECT), new ADuplexObjectInputPortLauncherSupport());
    put(new APortDescription(PortKind.CLIENT_INPUT_PORT, PortAccessKind.DUPLEX, PortMessageKind.BUFFER), new ADuplexBufferInputPortLauncherSupport());
    put(new APortDescription(PortKind.SERVER_INPUT_PORT, PortAccessKind.DUPLEX, PortMessageKind.BUFFER), new ADuplexBufferInputPortLauncherSupport());
    put(new APortDescription(PortKind.CLIENT_INPUT_PORT, PortAccessKind.DUPLEX, PortMessageKind.OBJECT), new ADuplexObjectInputPortLauncherSupport());
    put(new APortDescription(PortKind.SERVER_INPUT_PORT, PortAccessKind.DUPLEX, PortMessageKind.OBJECT), new ADuplexObjectInputPortLauncherSupport());
    put(new APortDescription(PortKind.CLIENT_INPUT_PORT, PortAccessKind.DUPLEX, PortMessageKind.RPC), new ADuplexRPCInputPortLauncherSupport());
    put(new APortDescription(PortKind.SERVER_INPUT_PORT, PortAccessKind.DUPLEX, PortMessageKind.RPC), new ADuplexRPCInputPortLauncherSupport());
}
Also used : APortDescription(port.APortDescription) ASimplexObjectInputPortLauncherSupport(inputport.datacomm.simplex.object.ASimplexObjectInputPortLauncherSupport) ADuplexObjectInputPortLauncherSupport(inputport.datacomm.duplex.object.ADuplexObjectInputPortLauncherSupport) ADuplexRPCInputPortLauncherSupport(inputport.rpc.duplex.ADuplexRPCInputPortLauncherSupport) ASimplexBufferInputPortLauncherSupport(inputport.datacomm.simplex.buffer.ASimplexBufferInputPortLauncherSupport) ADuplexBufferInputPortLauncherSupport(inputport.datacomm.duplex.buffer.ADuplexBufferInputPortLauncherSupport)

Aggregations

ADuplexRPCInputPortLauncherSupport (inputport.rpc.duplex.ADuplexRPCInputPortLauncherSupport)4 ADuplexBufferInputPortLauncherSupport (inputport.datacomm.duplex.buffer.ADuplexBufferInputPortLauncherSupport)3 ADuplexObjectInputPortLauncherSupport (inputport.datacomm.duplex.object.ADuplexObjectInputPortLauncherSupport)3 ASimplexBufferInputPortLauncherSupport (inputport.datacomm.simplex.buffer.ASimplexBufferInputPortLauncherSupport)3 ASimplexObjectInputPortLauncherSupport (inputport.datacomm.simplex.object.ASimplexObjectInputPortLauncherSupport)3 AGroupBufferInputPortLauncherSupport (inputport.datacomm.group.buffer.AGroupBufferInputPortLauncherSupport)2 AGroupObjectInputPortLauncherSupport (inputport.datacomm.group.object.AGroupObjectInputPortLauncherSupport)2 AGroupRPCInputPortLauncherSupport (inputport.rpc.group.AGroupRPCInputPortLauncherSupport)2 RPCProxyGenerator (inputport.rpc.RPCProxyGenerator)1 DuplexRPCClientInputPort (inputport.rpc.duplex.DuplexRPCClientInputPort)1 APortDescription (port.APortDescription)1 PortLauncherSupport (port.PortLauncherSupport)1 ACausalGroupSessionPortLauncherSupport (port.causal.ACausalGroupSessionPortLauncherSupport)1 AClientDelayingPortLauncherSupport (port.delay.AClientDelayingPortLauncherSupport)1