com.foxsmart.ic.lang
Interface InterruptibleThread


public interface InterruptibleThread

This interface represents a thread that is interruptible. The run method of any class implementing this interface is invoked when the ThreadMonitor class's run method is called. The code placed in the run method is passed a ThreadMonitor object which has two main purposes:

The ThreadMonitor's isInterrupted method should be checked periodically to see if the thread is being interrupted. If so, the code in the run method should return as soon as reasonably possible.

The setTimeoutMessage method should be called with an updated message before each independent operation within the run method. This message will be included in the timeout exception if the thread times out.


Method Summary
 void run(ThreadMonitor threadMonitor)
          This method gets called when the thread gets executed.
 

Method Detail

run

void run(ThreadMonitor threadMonitor)
         throws java.lang.Exception
This method gets called when the thread gets executed.

Parameters:
threadMonitor - The thread monitor object that will monitor the thread being executed.
Throws:
java.lang.Exception - if the code in the run method encountered a problem. When this exception is thrown, the ThreadMonitor's run method will throw a ThreadErrorException which will contain this exception.


Copyright © 2005-2008 Fox Smart, Inc. All Rights Reserved.