aicas logoJamaica 6.4 release 1

javax.realtime
Interface Interruptible


public interface Interruptible

Jamaica Real-Time Specification for Java interface Interruptible.

Implementations of this interface can be passed to AsynchronouslyInterruptedException.doInterruptible() to pass the code that should be executed in an interruptible way.


Method Summary
 void interruptAction(AsynchronouslyInterruptedException exception)
          interruptAction will be called when the run() method returned because it was interrupted asynchronously.
 void run(AsynchronouslyInterruptedException exception)
          run contains the code that is to be executed in an interruptible way.
 

Method Detail

run

void run(AsynchronouslyInterruptedException exception)
         throws AsynchronouslyInterruptedException

run contains the code that is to be executed in an interruptible way.

To actually be interruptible, the method implementation has to include the "throws AsynchronouslyInterruptedException" clause that enables asynchronous interruption of the code. The same holds for all methods called by this run method: if their execution should be interruptible, they must include this throws clause.

Parameters:
exception - The AsynchronouslyInterruptedException whose doInterruptible method called this method.
Throws:
AsynchronouslyInterruptedException

interruptAction

void interruptAction(AsynchronouslyInterruptedException exception)
interruptAction will be called when the run() method returned because it was interrupted asynchronously. This permits to determine whether run() returned normally or was interrupted.

Parameters:
exception - The AsynchronouslyInterruptedException that caused run() to be interrupted.

aicas logoJamaica 6.4 release 1

aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2015 aicas GmbH. All Rights Reserved.