|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.uhn.hl7v2.app.DefaultApplication
public class DefaultApplication
An Application that does nothing with the message and returns an Application Reject message in response. To be used when there are no other Applications that can process a given message.
Constructor Summary | |
---|---|
DefaultApplication()
Creates a new instance of DefaultApplication |
Method Summary | |
---|---|
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(Segment inboundHeader)
Creates an ACK message with the minimum required information from an inbound message. |
Message |
processMessage(Message in)
Creates and returns an acknowledgement -- the details are determined by fillDetails(). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultApplication()
Method Detail |
---|
public boolean canProcess(Message in)
canProcess
in interface Application
public Message processMessage(Message in) throws ApplicationException
processMessage
in interface Application
ApplicationException
public void fillDetails(Message ack) throws ApplicationException
ApplicationException
public static Message makeACK(Segment inboundHeader) throws HL7Exception, java.io.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 message
java.io.IOException
- if there is a problem reading or writing the message ID file
DataTypeException
- if there is a problem setting ACK values
HL7Exception
public static void fillResponseHeader(Segment inbound, Segment outbound) throws HL7Exception, java.io.IOException
MessageIDGenerator
is
used to create a unique message ID. Version and message type fields are
not populated.
HL7Exception
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |