util
Interface Asynchronous

All Known Implementing Classes:
AsynchronousCcdDriver, JanosDriver

public interface Asynchronous

An interface signaling that an object is

  1. Multithreaded, can be accessed simultaneously.
  2. And there is a specific operation that can be interrupted.


Method Summary
 boolean interruptProcess()
          For objects with a single purpose calling this method should interrupt an ongoing execution of this single purpose or for multi-purpose objects to stop all actions.
 boolean interruptProcess(Method that)
          For multi-purpose objects, this interrupts a special method.
 

Method Detail

interruptProcess

boolean interruptProcess()
                         throws InterruptedException
For objects with a single purpose calling this method should interrupt an ongoing execution of this single purpose or for multi-purpose objects to stop all actions. This method should return rather fast, but the process should be already interrupted on method return. For objects that should be cancelable, i.e. objects that are canceled, but the process might still be ongoing, look at CancelableRunnable.

Returns:
True, if process was interrupted.
Throws:
InterruptedException

interruptProcess

boolean interruptProcess(Method that)
                         throws InterruptedException
For multi-purpose objects, this interrupts a special method. This method should return rather fast, but the process should be already interrupted on method return. For objects that should be cancelable, i.e. objects that are canceled, but the process might still be ongoing, look at CancelableRunnable.

Returns:
True, if process was interrupted.
Throws:
InterruptedException