ca.uhn.hl7v2.protocol.impl
Class ApplicationLoader

java.lang.Object
  extended by ca.uhn.hl7v2.protocol.impl.ApplicationLoader

public class ApplicationLoader
extends java.lang.Object

A utility for loading Applicaiton and ReceivingApplication bindings from configuration files.

Version:
$Revision: 1.1 $ updated on $Date: 2007/02/19 02:24:26 $ by $Author: jamesagnew $
Author:
Bryan Tripp

Constructor Summary
ApplicationLoader()
           
 
Method Summary
static void loadApplications(ApplicationRouter theRouter, java.net.URL theSource)
          A convenience method for binding applications to an ApplicationRouter Information about bindings is read from a file at a specified URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationLoader

public ApplicationLoader()
Method Detail

loadApplications

public static void loadApplications(ApplicationRouter theRouter,
                                    java.net.URL theSource)
                             throws java.io.IOException,
                                    HL7Exception,
                                    java.lang.ClassNotFoundException,
                                    java.lang.InstantiationException,
                                    java.lang.IllegalAccessException

A convenience method for binding applications to an ApplicationRouter Information about bindings is read from a file at a specified URL. Each line in the file should have the following format (entries TAB delimited):

message_type trigger_event processing_id version_id app_class

Note that the first four fields can be the wildcard "*", which means any.

For example, if you write an Application called org.yourorganiztion.ADTProcessor that processes several types of ADT messages, and another called org.yourorganization.ResultProcessor that processes result messages, you might have a file that looks like this:

ADT * * * org.yourorganization.ADTProcessor
ORU R01 * * org.yourorganization.ResultProcessor

Each class listed in this file must implement either ca.uhn.hl7v2.app.Application or ca.uhn.hl7v2.protocol.ReceivingApplication, and must have a zero-argument constructor.

Parameters:
theRouter - the ApplicationRouter on which to make the binding
theSource - a URL pointing to the bindings file
Throws:
java.io.IOException
HL7Exception
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException


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