use of inputport.rpc.RPCProxyGenerator 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.RPCProxyGenerator in project GIPC by pdewan.
the class ASimplexRPCClientInputPortLauncher method createProxies.
@Override
protected void createProxies() {
RPCProxyGenerator rpcProxyGenerator = ((SimplexRPCClientInputPort) mainPort).getRPCProxyGenerator();
upperCaseProxy = (UpperCasePrinter) rpcProxyGenerator.generateRPCProxy(null, AnUpperCasePrinter.class, null);
}
Aggregations