Source:
<code>public void run() { ConnectionFactory cf = new ConnectionFactory(Constants.DEFAULT_URL); try { Connection conn = cf.createConnection(); FPublisherTransportFactory publisherFactory = new FNatsPublisherTransport.Factory(conn); FSubscriberTransportFactory subscriberFactory = new FNatsSubscriberTransport.Factory(conn); FScopeProvider provider = new FScopeProvider(publisherFactory, subscriberFactory, protocolFactory); EventsSubscriber.Iface subscriber = new EventsSubscriber.Client(provider); try { subscriber.subscribeEventCreated("*", "*", "call", Integer.toString(port), (context, event) -> { System.out.format("received " + context + " : " + event); EventsPublisher.Iface publisher = new EventsPublisher.Client(provider); try { publisher.open(); String preamble = context.getRequestHeader(utils.PREAMBLE_HEADER); <START> String ramble = context.getRequestHeader(utils.RAMBLE_HEADER); <END> event = new Event(1, "received call"); publisher.publishEventCreated(new FContext("Call"), preamble, ramble, "response", Integer.toString(port), event); } catch (TException e) { System.out.println("Error opening publisher to respond" + e.getMessage()); } }); } catch (TException e) { System.out.println("Error subscribing" + e.getMessage()); } System.out.println("Subscriber started..."); } catch (TimeoutException | IOException e) { System.out.println("Error connecting to nats" + e.getMessage()); } }</code><technical_language>This match docstring in IDL. Yes, prefixes utils file, pull client provided context? Ideally, of servers plug-n-play SDK test</technical_language>

Target:
public void run() { ConnectionFactory cf = new ConnectionFactory(Constants.DEFAULT_URL); try { Connection conn = cf.createConnection(); FPublisherTransportFactory publisherFactory = new FNatsPublisherTransport.Factory(conn); FSubscriberTransportFactory subscriberFactory = new FNatsSubscriberTransport.Factory(conn); FScopeProvider provider = new FScopeProvider(publisherFactory, subscriberFactory, protocolFactory); EventsSubscriber.Iface subscriber = new EventsSubscriber.Client(provider); try { subscriber.subscribeEventCreated("*", "*", "call", Integer.toString(port), (context, event) -> { System.out.format("received " + context + " : " + event); EventsPublisher.Iface publisher = new EventsPublisher.Client(provider); try { publisher.open(); String preamble = context.getRequestHeader(utils.PREAMBLE_HEADER); if (preamble == null || "".equals(preamble)) { System.out.println("Client did not provide preamble header"); return; } String ramble = context.getRequestHeader(utils.RAMBLE_HEADER); if (ramble == null || "".equals(ramble)) { System.out.println("Client did not provide ramble header"); return; } event = new Event(1, "received call"); publisher.publishEventCreated(new FContext("Call"), preamble, ramble, "response", Integer.toString(port), event); } catch (TException e) { System.out.println("Error opening publisher to respond" + e.getMessage()); } }); } catch (TException e) { System.out.println("Error subscribing" + e.getMessage()); } System.out.println("Subscriber started..."); } catch (TimeoutException | IOException e) { System.out.println("Error connecting to nats" + e.getMessage()); } }