Package ca.uhn.hl7v2.protocol.impl
Class AppWrapper
java.lang.Object
ca.uhn.hl7v2.protocol.impl.AppWrapper
- All Implemented Interfaces:
ReceivingApplication<Message>
Wraps a ca.uhn.hl7v2.app.Application as a ca.uhn.hl7v2.protocol.ReceivingApplication.
ReceivingApplication replaces Application with HAPI 0.5.
- Version:
- $Revision: 1.1 $ updated on $Date: 2007-02-19 02:24:26 $ by $Author: jamesagnew $
- Author:
- Bryan Tripp
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanProcess(Message theMessage) processMessage(Message theMessage, Map<String, Object> theMetadata) Uses the contents of the message for whatever purpose the application has for this message, and returns an appropriate response message.
-
Constructor Details
-
AppWrapper
- Parameters:
theApplication- an Application to wrap as a ReceivingApplication.
-
-
Method Details
-
processMessage
public Message processMessage(Message theMessage, Map<String, Object> theMetadata) throws ReceivingApplicationException, HL7ExceptionDescription copied from interface:ReceivingApplicationUses the contents of the message for whatever purpose the application has for this message, and returns an appropriate response message.- Specified by:
processMessagein interfaceReceivingApplication<Message>- Parameters:
theMessage- an inbound HL7 messagetheMetadata- message metadata (which may include information about where the message comes from, etc). This is the same metadata as inTransportable.getMetadata().- Returns:
- an appropriate application response (for example an application ACK or query response). Appropriate responses to different types of incoming messages are defined by HL7.
- Throws:
ReceivingApplicationException- if there is a problem internal to the application (for example a database problem)HL7Exception- if there is a problem with the message- See Also:
-
canProcess
- Specified by:
canProcessin interfaceReceivingApplication<Message>- Parameters:
theMessage- an inbound HL7 message- Returns:
- true if this ReceivingApplication 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.
- See Also:
-