public static void main(String[] args) { Tracer.showInfo(true); Tracer.setImplicitPrintKeywordKind(ImplicitKeywordKind.OBJECT_PACKAGE_NAME); Tracer.setMessagePrefixKind(MessagePrefixKind.FULL_CLASS_NAME); TraceableInfo.setPrintTraceable(true); TraceableInfo.setPrintSource(true); TraceableInfo.setPrintTime(true); TraceableInfo.setPrintThread(true); Tracer.setKeywordPrintStatus(ASimpleList.class, true); AnEchoComposerAndLauncher.traceUnawareLaunch(args); }
public static void launchTypedIPClient(String clientName) { Tracer.showInfo(true); SimplexClientInputPort<Object> clientInputPort = SimplexObjectInputPortSelector.createSimplexClientInputPort( "localhost", "9090", "test server", clientName); PrintingTypedReceiveListener printingTypedReceiveListener = new PrintingTypedReceiveListener(clientInputPort); clientInputPort.addConnectionListener(printingTypedReceiveListener); // clientInputPort.addDisconnectListener(printingTypedReceiveListener); // clientInputPort.addReceiveListener(printingTypedReceiveListener); // clientInputPort.addReceiveListener(printingTypedReceiveListener); clientInputPort.addSendListener(printingTypedReceiveListener); clientInputPort.connect(); // ByteBuffer message = ByteBuffer.wrap("hello server".getBytes()); // System.out.println("String with padding:" + new String(message.array())); // clientInputPort.send(message); clientInputPort.send("hello from" + clientName); }