public class AsynchronouslyInterruptedException extends AsynchronouslyInterruptedException
Jamaica Real-Time Specification for Java class AsynchronouslyInterruptedException.
This class is used to identify methods that should be asynchronously interruptible. Any methods that lists AsynchronouslyInterruptedException or any subclass of this class in its throws clause will be asynchronously interruptible. Within such a method, only code sequences that are enclosed by a synchronized() block are not asynchronously interruptible. However, calls to asynchronously interruptible methods that are performed within a synchronized block are, again, interruptible.
The asynchronous interrupt is generated by either a call to t.interrupt() for a RealtimeThread t or by a call to fire() for a schedulable object that currently performs code within a call to doInterruptible().
An asynchronous interrupt that is caused while the target schedulable object executes code that is not interruptible (a method that does not throw AsynchronouslyInterruptedException or a synchronized() block), the interrupt remains pending until this code enters an interruptible code section.
An AsynchronouslyInterruptedException may be caught, and it may be cleared by a call to clear(). However, propagation of an outer AsynchronouslyInterruptedException may not be stopped by a call to clear.
StaticThrowable.Hidden
Constructor and Description |
---|
AsynchronouslyInterruptedException()
Constructor to create an instance of
AsynchronouslyInterruptedException.
|
AsynchronouslyInterruptedException(String message)
Creates an instance of
AsynchronouslyInterruptedException . |
Modifier and Type | Method and Description |
---|---|
boolean |
doInterruptible(Interruptible logic)
doInterruptible executes the run() method of the provided
Interruptible.
|
static AsynchronouslyInterruptedException |
get()
Gets the preallocated version of this
Throwable . |
static AsynchronouslyInterruptedException |
getGeneric()
getGeneric returns the generic instance of
AsynchronouslyInterruptedException that is thrown on a call to
RealtimeThread.interrupt().
|
boolean |
happened(boolean propagate)
Deprecated.
RTSJ V1.0.1 use clear() instead.
|
clear, disable, doInterruptible, enable, fire, getSingleton, isEnabled, throwPending
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, init, init, init, init, initCause, isStatic, printStackTrace, printStackTrace, printStackTrace, setStackTrace, writeReplace
public AsynchronouslyInterruptedException()
public AsynchronouslyInterruptedException(String message)
AsynchronouslyInterruptedException
.message
- A message to identify this instance.public static AsynchronouslyInterruptedException get()
Throwable
. Allocation is
done in memory that acts like ImmortalMemory
. The message and
cause are cleared and the stack trace is filled out.public static AsynchronouslyInterruptedException getGeneric()
public boolean doInterruptible(Interruptible logic)
StaticIllegalArgumentException
- iff the provided logic parameter
is null.logic
- Contains the run() method that specifies the logic
to be executed in an interruptible way.public boolean happened(boolean propagate)
If the currently pending exception is not this, and propagate is true, the pending AIE will be propagated outward (thrown), even though it is not listed in the throws clause of this method.
If the currently pending exception is not this, and propagate is false, false will be returned and the pending AIE will remain pending.
propagate
- true to immediately throw a pending AIE
different to this.aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2022 aicas GmbH. All Rights Reserved.