var app = { init : function() { document.addEventListener("deviceready", this.deviceready, false); }, deviceready : function() { app.appWrapper = this.createAppWrapper();//watch out who is "this", you should use "app" but not "this" }, createAppWrapper : function() { return new AppWrapper(); } }; app.init();
/** * 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); }
registerApplication(type, event, new AppWrapper(app)); } catch (ClassCastException cce) { throw new HL7Exception("The specified class, " + className
app = (ReceivingApplication<? extends Message>) appObject; } else if (appObject instanceof Application) { app = new AppWrapper((Application) appObject); } else { throw new HL7Exception(
registerApplication(type, event, new AppWrapper(app)); } catch (ClassCastException cce) { throw new HL7Exception("The specified class, " + className
app = (ReceivingApplication<? extends Message>) appObject; } else if (appObject instanceof Application) { app = new AppWrapper((Application) appObject); } else { throw new HL7Exception(