|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Interruptible
Interruptible
is an interface implemented by classes
that will be used as arguments on the method doInterruptible()
of
AsynchronouslyInterruptedException
and its subclasses.
doInterruptible()
invokes the implementation of the
method in this interface.
Method Summary | |
---|---|
void |
interruptAction(AsynchronouslyInterruptedException exception)
This method is called by the system if the run() method
is interrupted. |
void |
run(AsynchronouslyInterruptedException exception)
The main piece of code that is executed when an implementation is given to doInterruptible() . |
Method Detail |
---|
void run(AsynchronouslyInterruptedException exception) throws AsynchronouslyInterruptedException
doInterruptible()
.
When a class is created that implements this
interface (for example through an anonymous inner class)
it must include the throws
clause
to make the method interruptible. If the throws clause is
omitted the run()
method will not be interruptible.
exception
- The AIE object whose doInterruptible method is
calling the run
method. Used to invoke methods on
AsynchronouslyInterruptedException
from
within the run()
method.
AsynchronouslyInterruptedException
void interruptAction(AsynchronouslyInterruptedException exception)
run()
method
is interrupted. Using this, the program logic can determine
if the run()
method completed normally or had its control
asynchronously transferred to its caller.
exception
- The currently pending AIE. Used to invoke methods on
AsynchronouslyInterruptedException
from
within the interruptAction()
method.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |