interface submitJob:BeanContextChild

void test();
void submit(in CmdLineEvent e);
void submitLocally(in string commandLine);
creates String array outputLine
creates boolean array waitForRead
creates and starts new thread runIt of type jobThreadLocal

Thread jobThreadLocal
submits the job (Process p=Runtime.getRuntime().exec(command);)
creates and starts new thread writeThread of type writeStdout

Thread writeStdout
opens InputDataStream piped to the process standard output
instantiates BufferedReader connected to the InputDataStream
reads standard output line after line, and puts it into outputLine array maintained by submitLocally by calling its method setOLine. While setting i-th element of outputLine it also sets (i+1)-th element to "wait" and i-th element of waitForRead array to "true". The size of outputLine is 20, and the output lines are stored in the round robin fashion. If an element waitForRead is "true", it means that the front end client have not read it, so it cannot be overwritten. If this happens (the producer is faster than the consumer), the tread sleeps untill the client change the value to "false". The oposite case, when the client is faster than the producer, is handled by setting the value of the line to be read to "wait". The client thread blocks until the writeStdout overwrites that value by a newly read line from the standard output.

void setOLine(in long i, in string s); (used with submitLocally)
sets value of i-th element of outputLine array
string getOLine(in long i); (used with submitLocally)
returns value of i-th element of outputLine array
void setLineRead(in long i); (used with submitLocally)
sets value of i-th element of waitForRead array to false
string submitNQS(in string commandLine);
void submitRsh(in string host, in string user, in string commandLine);
void submitGlobus(in string GramKeeper, in string RSL, in string user);
void exportFile(in string src, in string dst, in string rh, in string u);
void importFile(in string src, in string dst, in string rh, in string u);
void setJobCompleted(in string jobid);
boolean getJobCompleted(in string jobid);
void to_unix(in string dos, in string unix);