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();
}
}
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();
}
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();
}
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());
}
Aggregations