public abstract class TestApplication extends Object implements Application
| Constructor and Description |
|---|
TestApplication()
Deprecated.
Creates a new instance of TestApplication
|
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
canProcess(Message in)
Deprecated.
Returns true if this Application wishes to accept the message.
|
Message |
processMessage(Message in)
Deprecated.
Calls test(Message in), routes resulting exceptions to configured destinations, and
returns an ack (which should not normally be used since the test app is intended
to operate in parallel with system-to-system communication).
|
abstract HL7Exception[] |
test(Message in)
Deprecated.
Tests the message in some way (as defined by implementing class).
|
public TestApplication()
public abstract boolean canProcess(Message in)
canProcess in interface Applicationpublic Message processMessage(Message in) throws HL7Exception
Calls test(Message in), routes resulting exceptions to configured destinations, and returns an ack (which should not normally be used since the test app is intended to operate in parallel with system-to-system communication).
Notification routing is performed using log4j, so you need appropriate settings in a log4j config file (by default, ./log4j.properties). Different types of exceptions are all given the same severity (ERROR) but they have different loggers, based on the exception class name. Specifically, the loggers will be named ca.uhn.hl7v2.validation.error.{exception class name}. For example: "ca.uhn.hl7v2.validation.error.DataTypeException". Note that this allows default settings for all validation errors using the logger "ca.uhn.hl7v2.validation.error". The intent is for different exceptions to result in different actions, e.g. a ProfileNotHL7CompliantException should probably just be logged or ignored, while a ProfileNotFollowedException should probably be emailed to an administrator.
processMessage in interface ApplicationHL7Exceptionpublic abstract HL7Exception[] test(Message in) throws HL7Exception
HL7Exception - if the message can't be tested (not for errors disovered
during testing)Copyright © 2001-2013 University Health Network. All Rights Reserved.