public class DefaultApplication extends Object implements Application
| Constructor and Description |
|---|
DefaultApplication()
Creates a new instance of DefaultApplication
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canProcess(Message in)
Returns true.
|
void |
fillDetails(Message ack)
Fills in the details of an Application Reject message, including response
and error codes, and a text error message.
|
static void |
fillResponseHeader(Segment inbound,
Segment outbound)
Populates certain required fields in a response message header, using
information from the corresponding inbound message.
|
static Message |
makeACK(Message message)
Creates an ACK message with the minimum required information from an
inbound message.
|
static Message |
makeACK(Segment inboundHeader) |
Message |
processMessage(Message in)
Creates and returns an acknowledgement -- the details are determined by
fillDetails().
|
public DefaultApplication()
public boolean canProcess(Message in)
canProcess in interface Applicationpublic Message processMessage(Message in) throws ApplicationException
processMessage in interface ApplicationApplicationExceptionpublic void fillDetails(Message ack) throws ApplicationException
ApplicationExceptionpublic static Message makeACK(Message message) throws HL7Exception, IOException
ca.uhn.hl7v2.util.MessageIDGenerator. Also note that the ACK
messages returned is the same version as the version stated in the
inbound MSH if there is a generic ACK for that version, otherwise a
version 2.4 ACK is returned. MSA-1 is set to AA by default.inboundHeader - the MSH segment if the inbound messageIOException - if there is a problem reading or writing the message ID fileDataTypeException - if there is a problem setting ACK valuesHL7Exceptionpublic static Message makeACK(Segment inboundHeader) throws HL7Exception, IOException
HL7ExceptionIOExceptionpublic static void fillResponseHeader(Segment inbound, Segment outbound) throws HL7Exception, IOException
MessageIDGenerator is
used to create a unique message ID. Version and message type fields are
not populated.HL7ExceptionIOExceptionCopyright © 2001-2012 University Health Network. All Rights Reserved.