ca.uhn.hl7v2.validation.app
Class MultiTestApplication

java.lang.Object
  extended by ca.uhn.hl7v2.validation.app.TestApplication
      extended by ca.uhn.hl7v2.validation.app.MultiTestApplication
All Implemented Interfaces:
Application

public class MultiTestApplication
extends TestApplication

A composite test application that delegates to multiple other test applications and returns a combined list of problems.

Author:
Bryan Tripp

Constructor Summary
MultiTestApplication()
          Creates a new instance of MultiTestApplication
 
Method Summary
 void addTest(TestApplication test)
          Registers a test app so that messages will be tested against it.
 boolean canProcess(Message in)
          Returns true if ANY of the delegates can accept the message.
 HL7Exception[] test(Message in)
          Tests the message by passing it to all test apps that have been registered using addTest().
 
Methods inherited from class ca.uhn.hl7v2.validation.app.TestApplication
processMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiTestApplication

public MultiTestApplication()
Creates a new instance of MultiTestApplication

Method Detail

canProcess

public boolean canProcess(Message in)
Returns true if ANY of the delegates can accept the message.

Specified by:
canProcess in interface Application
Specified by:
canProcess in class TestApplication

test

public HL7Exception[] test(Message in)
                    throws HL7Exception
Tests the message by passing it to all test apps that have been registered using addTest().

Specified by:
test in class TestApplication
Returns:
exceptions that describe any identified problems with the message
Throws:
HL7Exception - if the message can't be tested (not for errors disovered during testing)

addTest

public void addTest(TestApplication test)
Registers a test app so that messages will be tested against it.



Copyright © 2001-2011 University Health Network. All Rights Reserved.