|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ReceivingApplication
From an HL7 messaging perspective, a ReceivingApplication 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 ReceivingApplication, then look at HL7Server and ApplicationRouter to see how to get HAPI to listen for messages on a socket and pass them to your ReceivingApplication.
Note that this interface replaces ca.uhn.hl7v2.app.Application in HAPI 0.5.
Method Summary | |
---|---|
boolean |
canProcess(Message theMessage)
|
Message |
processMessage(Message theMessage,
java.util.Map theMetadata)
Uses the contents of the message for whatever purpose the application has for this message, and returns an appropriate response message. |
Method Detail |
---|
Message processMessage(Message theMessage, java.util.Map theMetadata) throws ReceivingApplicationException, HL7Exception
theMessage
- an inbound HL7 messagetheMetadata
- message metadata (which may include information about where the message comes
from, etc). This is the same metadata as in Transportable.
ReceivingApplicationException
- if there is a problem internal to the application (for example
a database problem)
HL7Exception
- if there is a problem with the messageboolean canProcess(Message theMessage)
theMessage
- an inbound HL7 message
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |