next up previous contents
Next: Agent Class Up: Structure of an Agent Previous: The AgentLoader   Contents


Thread controlling in Java

The methods init- / start- / stop- / concludeAgent uses very complex mechanisms to accomplish their tasks. The class Thread indeed provides methods for starting, stopping and destroying a thread, unfortunately they had caused big problems with the monitors used by the thread. For this cause they (stop, resume) are deprecated in JDK 1.2.x and higher. The method to terminate a thread Thread.destroy() has never been implemented for this reasons. For a detailed description see [THRDS].

All the threads in the TAgents System are using their own methods to stop, resume and terminate a thread. The same is valid for the Agent thread.



Thomas Letsch 2001-02-21