|
I think you would have to create a thread to monitor the job but it wouldn't be too difficult, and the thread could fire PropertyChangeEvents to monitor/listen for. Would this do what you need?This is very close to what I would do, so it sounds like a reasonable
ProgramCall.getServerJob() returns the Job object which will execute the ProgramCall.run().
So if the program called by ProgramCall goes into message wait, the server job will be in message wait, right?
Put PropertyChangeSupport into the thread you are considering building. Put a shutdown() method in it. Instantiate the thread with the Job object returned by ProgramCall.getServerJob().
run() method of thread periodically checks the status of the Job passed to it when initiated. If status of job is MSGW it fires a PropertyChangeEvent.
After ProgramCall.run() returns call the shutdown method of the thread. If listener get MSGW event call the shutdown method of the thread.
Would that do it?
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.