/** * Returns an instance of AppRoutingData which accepts all * message types, versions, etc. */ public static AppRoutingData withAll() { return new AppRoutingDataImpl("*","*", "*", "*"); }
/** * Returns an instance of AppRoutingData which accepts all * message types, versions, etc. */ public static AppRoutingData withAll() { return new AppRoutingDataImpl("*","*", "*", "*"); }
/** * Registers the given application to handle messages corresponding to the * given type and trigger event. Only one application can be registered for * a given message type and trigger event combination. A repeated * registration for a particular combination of type and trigger event * over-writes the previous one. Note that the wildcard "*" for messageType * or triggerEvent means any type or event, respectively. */ public void registerApplication(String messageType, String triggerEvent, ReceivingApplication handler) { applicationRouter.bindApplication(new AppRoutingDataImpl(messageType, triggerEvent, "*", "*"), handler); }
/** * Registers the given application to handle messages corresponding to ALL * message types and trigger events. */ public synchronized void registerApplication(ReceivingApplication<? extends Message> application) { registerApplication(new AppRoutingDataImpl("*", "*", "*", "*"), application); }
/** * Registers the given application to handle messages corresponding to the * given type and trigger event. Only one application can be registered for * a given message type and trigger event combination. A repeated * registration for a particular combination of type and trigger event * over-writes the previous one. Note that the wildcard "*" for messageType * or triggerEvent means any type or event, respectively. */ public void registerApplication(String messageType, String triggerEvent, ReceivingApplication handler) { applicationRouter.bindApplication(new AppRoutingDataImpl(messageType, triggerEvent, "*", "*"), handler); }
/** * Registers the given application to handle messages corresponding to ALL * message types and trigger events. */ public synchronized void registerApplication(ReceivingApplication<? extends Message> application) { registerApplication(new AppRoutingDataImpl("*", "*", "*", "*"), application); }
/** * Registers the given application to handle messages corresponding to the * given type and trigger event. Only one application can be registered for * a given message type and trigger event combination. A repeated * registration for a particular combination of type and trigger event * over-writes the previous one. Note that the wildcard "*" for messageType * or triggerEvent means any type or event, respectively. * * @deprecated use {@link #registerApplication(String, String, ca.uhn.hl7v2.protocol.ReceivingApplication)} and * {@link ca.uhn.hl7v2.protocol.impl.AppWrapper} */ public synchronized void registerApplication(String messageType, String triggerEvent, Application handler) { ReceivingApplication<Message> handlerWrapper = new AppWrapper(handler); applicationRouter.bindApplication(new AppRoutingDataImpl(messageType, triggerEvent, "*", "*"), handlerWrapper); }
/** * Registers the given application to handle messages corresponding to the * given type and trigger event. Only one application can be registered for * a given message type and trigger event combination. A repeated * registration for a particular combination of type and trigger event * over-writes the previous one. Note that the wildcard "*" for messageType * or triggerEvent means any type or event, respectively. * * @deprecated use {@link #registerApplication(String, String, ca.uhn.hl7v2.protocol.ReceivingApplication)} and * {@link ca.uhn.hl7v2.protocol.impl.AppWrapper} */ public synchronized void registerApplication(String messageType, String triggerEvent, Application handler) { ReceivingApplication<Message> handlerWrapper = new AppWrapper(handler); applicationRouter.bindApplication(new AppRoutingDataImpl(messageType, triggerEvent, "*", "*"), handlerWrapper); }
= new AppRoutingDataImpl(type, event, procId, verId); theRouter.bindApplication(rd, app);
= new AppRoutingDataImpl(type, event, procId, verId); theRouter.bindApplication(rd, 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; }
/** * 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; }