Example #1
0
 /** Start agent scheduler thread. Should be called once at init time. */
 public synchronized void startThread() {
   if (agentThread == null) {
     agentThread = new AgentThread(getName());
     agentThread.start(); // causes the run method to execute in the AgentThread below
   } else {
     agentThread.interrupt(); // don't worry about this for now
   }
 }