From: Rick R. <ri...@ne...> - 2015-04-22 22:30:13
|
On a client connection, which should never get closed i.e. try { connection = context.newClient( host, port, useTls ); } catch( HL7Exception ex ) { logger.error( ex ); } return connection; I have the need to detect if the server closes the connection. I can see that ca.uhn.hl7v2.app.Receiver, detects this event and logs it: 18:06:00,060 INFO [ca.uhn.hl7v2.app.Receiver] (hapi-worker-31) SocketException: closing Connection from 172.20.1.129:6661, will no longer read messages with this Receiver: socket closed Is there a way that my application can also detect this event and trigger an alert on it? I see how to do this from the server side: hl7Service.registerApplication( "*", "*", msgHandler ); But do not see how a client connection can detect if the connection is lost. Thanks in advance, Rick Roberts |