|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.uhn.hl7v2.app.Responder
public class Responder
Performs the responding role in a message exchange (i.e receiver of the first message, sender of the response; analagous to the server in a client-server interaction), according to HL7's original mode processing rules.
At the time of writing, enhanced mode, two-phase reply, continuation messages, and batch processing are unsupported.
| Constructor Summary | |
|---|---|
Responder(Parser parser)
Creates a new instance of Responder that optionally validates parsing of incoming messages using a system property. |
|
Responder(Parser parser,
boolean checkParse)
Creates a new instance of Responder that optionally validates parsing of incoming messages. |
|
| Method Summary | |
|---|---|
static String |
logAndMakeErrorMessage(Exception e,
Segment inHeader,
Parser p,
String encoding)
Logs the given exception and creates an error message to send to the remote system. |
static void |
main(String[] args)
Test code. |
protected String |
processMessage(String incomingMessageString)
Processes an incoming message string and returns the response message string. |
void |
registerApplication(Application a)
Registers an Application with this Responder. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Responder(Parser parser)
throws LLPException
ca.uhn.hl7v2.app.checkparse equals "true", parse integrity
is checked, i.e. each message is re-encoded and differences between the
received message text and the re-encoded text are written to the file
LLPException
public Responder(Parser parser,
boolean checkParse)
validate - if true, encodes each incoming message after parsing it,
compares the result to the original message string, and prints
differences to the file "| Method Detail |
|---|
protected String processMessage(String incomingMessageString)
throws HL7Exception
registerApplication. The Parser is obtained from the
Connection associated with this Responder.
HL7Exception
public static String logAndMakeErrorMessage(Exception e,
Segment inHeader,
Parser p,
String encoding)
throws HL7Exception
encoding - The encoding for the error message. If null, uses
default encoding
HL7Exceptionpublic void registerApplication(Application a)
canProcess()) until one
of them accepts responsibility for the message. If none of the registered
applications can process the message, a DefaultApplication is used, which
simply returns an Application Reject message.
public static void main(String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||