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.
Modifier and Type | Method and Description |
---|---|
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.
|
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.
AsynchronouslyInterruptedException
exception
- The AsynchronouslyInterruptedException whose
doInterruptible method called this method.void interruptAction(AsynchronouslyInterruptedException exception)
exception
- The AsynchronouslyInterruptedException that
caused run() to be interrupted.aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2019 aicas GmbH. All Rights Reserved.