From: Jonny R. <jon...@vi...> - 2016-12-07 00:06:44
|
James – many thanks for your help. Regards Jonny From: James Agnew <jam...@gm...> Date: Tuesday, 6 December 2016 at 16:00 To: Jonny Rylands <jon...@vi...> Cc: "hl7...@li..." <hl7...@li...> Subject: Re: [HAPI-devel] Tying a received message to a connection Hi Jonny, Have a look at MetadataKeys.java. These can be used as keys in the ReceivingApplication (assuming you're using ApplicationRouter) to get the originating IP and port. It's not a reference to the connection exactly but it could be used to figure it out. Cheers, James On Tue, Dec 6, 2016 at 5:27 AM, Jonny Rylands <jon...@vi...<mailto:jon...@vi...>> wrote: Hi folks I have a small HAPI based server application to receive messages and forward them to another destination. I was wondering, is there a way to tie together Connections that are notified to the ConnectionListener with Messages that are notified to the ReceivingApplication? I’d like to be able to record a set of messages that were received against a particular connection. I’m configuring the receiving service in a standard way: HapiContext context = new DefaultHapiContext(); HL7Service service = context.newServer(channel.getPortNumber(), channel.isUseTls()); service.registerApplication("*", "*", new Hl7ReceivingApplication()); service.registerConnectionListener(new Hl7ConnectionListener()); service.setExceptionHandler(new Hl7ExceptionHandler()); service.startAndWait(); Many thanks Jonny ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/xeonphi _______________________________________________ Hl7api-devel mailing list Hl7...@li...<mailto:Hl7...@li...> https://lists.sourceforge.net/lists/listinfo/hl7api-devel |