|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
org.regenstrief.xhl7.MLLPServer
An HL7 MLLP server that transforms an HL7 received.
Configuration file is in XML. See ConfigurationHandler.
The MLLP server is a multi-threaded thing. It's started by reading the configuration file and the configuration drives all other actions. At the end of each server element, that server is started in a thread of its own (how about using select?) Then each sever thread spawns off handler threads, where a handler thread. For now we use default saturation behavior. It's simple minded but used to be the standard on UNIX and C for so many years, so it's not going to be a big concern now.
I am exceedingly inclined to put more rather than less functions into a single compilation unit. Particularly I hate to put little helper classes such as Exceptions or ContentHandlers into separate files, let alone make them public classes.
We have here, the MLLPServer class that has the following phases and threads:
Notice, this is a Java application, not really an API. You can of course launch it by calling the static main() method, anything beyond that is at your own risk.
Field Summary |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Method Summary | |
static void |
main(java.lang.String[] args)
Main entry point. |
void |
run()
Called by Thread.start(). |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public static void main(java.lang.String[] args) throws java.lang.Exception
args
- one argument, the URL of the configuration file.
java.lang.Excpetion
- if anthing goes wrong.
java.lang.Exception
public void run()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |