eu.ihe.vhl7tools.util
Class Vhl7Daemon

java.lang.Object
  extended by eu.ihe.vhl7tools.util.Vhl7Daemon
All Implemented Interfaces:
java.lang.Runnable

public class Vhl7Daemon
extends java.lang.Object
implements java.lang.Runnable

Author:
jfrancis

Field Summary
protected  java.util.Vector allincomingFolder
           
protected  java.util.Properties config
           
 java.lang.String incomingFolder
           
private static org.apache.log4j.Logger logger
           
 java.lang.String profileFolder
           
 java.lang.String resultFolder
           
 java.lang.String root
           
protected  boolean running
           
protected  java.lang.Thread t
           
 java.lang.String tableFolder
           
 java.lang.String targetFolder
           
private  java.lang.String whatTodo
           
 
Constructor Summary
Vhl7Daemon()
           
 
Method Summary
 void configuredDaemon()
           
 java.lang.String createValidatedHl7Command(java.io.File infile)
           
 void executeFile(java.io.File infile)
          Define the process to do with
 void executeshell(java.lang.String cmd)
          Execute on the shell
private static java.lang.String findVersion(java.io.File transactionFile, java.lang.String transaction)
          Read the transaction_standard.txt to find the HL7 message version in order to charge the table necesary for the validation
 void loadProperties(java.lang.String configuregfilePath)
           
static void main(java.lang.String[] args)
           
 void process_file(java.io.File infile)
          To run the client send the file from the incomingFolder to the targetFolder after process
 void run()
          To run the client send the file from the incomingFolder to the targetFolder after process
 boolean startClient()
           
 boolean stopClient()
           
 void visitAllDirs(java.io.File dir)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static final org.apache.log4j.Logger logger

incomingFolder

public java.lang.String incomingFolder

targetFolder

public java.lang.String targetFolder

root

public java.lang.String root

resultFolder

public java.lang.String resultFolder

profileFolder

public java.lang.String profileFolder

tableFolder

public java.lang.String tableFolder

whatTodo

private java.lang.String whatTodo

t

protected java.lang.Thread t

running

protected boolean running

config

protected java.util.Properties config

allincomingFolder

protected java.util.Vector allincomingFolder
Constructor Detail

Vhl7Daemon

public Vhl7Daemon()
Method Detail

startClient

public boolean startClient()

visitAllDirs

public void visitAllDirs(java.io.File dir)

run

public void run()
To run the client send the file from the incomingFolder to the targetFolder after process

Specified by:
run in interface java.lang.Runnable
See Also:
org.nule.integrateclient.file.FileIn#run()

process_file

public void process_file(java.io.File infile)
To run the client send the file from the incomingFolder to the targetFolder after process

See Also:
org.nule.integrateclient.file.FileIn#run()

findVersion

private static java.lang.String findVersion(java.io.File transactionFile,
                                            java.lang.String transaction)
                                     throws java.io.IOException
Read the transaction_standard.txt to find the HL7 message version in order to charge the table necesary for the validation

Parameters:
messageFile - : is the path to transaction_standard.txt which contains the correspondance between transaction and standard used
transaction - : is the transaction involved
Returns:
version : which is the the HL7 message version
Throws:
java.io.IOException

createValidatedHl7Command

public java.lang.String createValidatedHl7Command(java.io.File infile)

executeshell

public void executeshell(java.lang.String cmd)
Execute on the shell

Parameters:
cmd: - the command specifies by the client and define on the config

executeFile

public void executeFile(java.io.File infile)
Define the process to do with

Parameters:
infile:File - in

stopClient

public boolean stopClient()

loadProperties

public void loadProperties(java.lang.String configuregfilePath)

configuredDaemon

public void configuredDaemon()

main

public static void main(java.lang.String[] args)
Parameters:
args -