/** * @see ca.uhn.hl7v2.protocol.ApplicationRouter#hasActiveBinding(ca.uhn.hl7v2.protocol.ApplicationRouter.AppRoutingData) */ public boolean hasActiveBinding(AppRoutingData theRoutingData) { boolean result = false; ReceivingApplication<? extends Message> app = findDestination(null, theRoutingData); if (app != null) { result = true; } return result; }
/** * @see ca.uhn.hl7v2.protocol.ApplicationRouter#hasActiveBinding(ca.uhn.hl7v2.protocol.ApplicationRouter.AppRoutingData) */ public boolean hasActiveBinding(AppRoutingData theRoutingData) { boolean result = false; ReceivingApplication<? extends Message> app = findDestination(null, theRoutingData); if (app != null) { result = true; } return result; }
/** * Returns the first Application that has been bound to messages of this type. */ private <T extends Message> ReceivingApplication<T> findApplication(T theMessage) throws HL7Exception { Terser t = new Terser(theMessage); AppRoutingData msgData = new AppRoutingDataImpl(t.get("/MSH-9-1"), t.get("/MSH-9-2"), t.get("/MSH-11-1"), t.get("/MSH-12")); ReceivingApplication<T> app = findDestination(theMessage, msgData); //have to send back an application reject if no apps available to process if (app == null) { app = (ReceivingApplication<T>)new DefaultApplication(); } return app; }
/** * Returns the first Application that has been bound to messages of this type. */ private <T extends Message> ReceivingApplication<T> findApplication(T theMessage) throws HL7Exception { Terser t = new Terser(theMessage); AppRoutingData msgData = new AppRoutingDataImpl(t.get("/MSH-9-1"), t.get("/MSH-9-2"), t.get("/MSH-11-1"), t.get("/MSH-12")); ReceivingApplication<T> app = findDestination(theMessage, msgData); //have to send back an application reject if no apps available to process if (app == null) { app = (ReceivingApplication<T>)new DefaultApplication(); } return app; }