Interface SnippetOutcome.Suspended
- All Superinterfaces:
SnippetOutcome,SnippetOutcome.HaltsScript
- Enclosing interface:
SnippetOutcome
public static sealed interface SnippetOutcome.Suspended
extends SnippetOutcome, SnippetOutcome.HaltsScript
Indicates that the snippet invoked
JavaBox.suspend().
The script will be suspended mid-execution. To restart its execution, invoke resume()
with the value you want to be returned to the script from suspend().
After a snippet is resumed, a new outcome will have replaced the SnippetOutcome.Suspended outcome
in the next ScriptResult returned by resume().
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.dellroad.javabox.SnippetOutcome
SnippetOutcome.CompilerErrors, SnippetOutcome.CompilerSemanticErrors, SnippetOutcome.CompilerSyntaxErrors, SnippetOutcome.ControlViolation, SnippetOutcome.ExceptionThrown, SnippetOutcome.HaltsScript, SnippetOutcome.HasException<T extends Throwable>, SnippetOutcome.HasSnippet, SnippetOutcome.Interrupted, SnippetOutcome.Overwritten, SnippetOutcome.Successful, SnippetOutcome.SuccessfulNoValue, SnippetOutcome.SuccessfulWithValue, SnippetOutcome.Suspended, SnippetOutcome.UnresolvedReferences -
Method Summary
Methods inherited from interface org.dellroad.javabox.SnippetOutcome
box, offset, source
-
Method Details
-
parameter
Object parameter()Get the parameter that was passed toJavaBox.suspend().- Returns:
- suspend parameter
-