waitForData(){ |
waitForUpdate=true; |
while (waitForUpdate) { |
idle for 1 sec |
newMod = (new File(testFile)).lastModified; if(newMod>lastMod) waitForUpdate=false; } |
sendData(); fireEvent("Casc2dDone",ev); } |
sendData(){ createContents [OutContents] copy files from casc2Dir to OutFileBase |
} |
Casc2dDone |
event |
Class cas2dThread extends Thread{ |
run(){ |
Process p=Runtime.getRuntime().exec(Casc2dExec); p.waitFor(); }} |
run(){ |
cT = new cas2c2Thread(); cT.start(); waitForData(); } |
runAgain(){ |
receiveData(); moreEvents =nextEvent(lmsStatusFile); |
lastMod=(new File(testFile)).lastModified(); if(moreEvents) { |
reactivateCasc2d(touchCommand); waitForData(); } } |
receiveData(){ |
getHTTPfile(ContentsFile,ContentsFileURL); for i=0;i<nfiles; i++){ |
getHTTPfile(casc2dDir+fn, FileBaseURL+fn);} }} |
EdysDone |
event |
called from Front-End |