ca.uhn.hl7v2.app
Interface Application

All Known Implementing Classes:
AcceptApplication, DefaultApplication, MessageTypeRouter, MultiTestApplication, ProfileTestApplication, TestApplication

public interface Application

From an HL7 messaging perspective, an Application is a consumer of a messages. Once a parser parses an incoming message, the message would normally be forwarded to an Application of some sort (e.g. a lab system) which would process the message in some way meaningful for it, and then return a response.

If you are wondering how to integrate HAPI into an existing server application, this is probably the place. Create a class that implements Application, then look at Responder and SimpleServer to see how to get HAPI to listen for messages on a socket and pass them to your Application.

Author:
Bryan Tripp

Method Summary
 boolean canProcess(Message in)
          Returns true if this Application wishes to accept the message.
 Message processMessage(Message in)
          Uses the contents of the message for whatever purpose the Application has for this message, and returns an appropriate response message.
 

Method Detail

processMessage

Message processMessage(Message in)
                       throws ApplicationException,
                              HL7Exception
Uses the contents of the message for whatever purpose the Application has for this message, and returns an appropriate response message.

Throws:
ApplicationException
HL7Exception

canProcess

boolean canProcess(Message in)
Returns true if this Application wishes to accept the message. By returning true, this Application declares itself the recipient of the message, accepts responsibility for it, and must be able to respond appropriately to the sending system.



Copyright © 2001-2011 University Health Network. All Rights Reserved.