Module jdk.jshell
Package jdk.jshell.spi
package jdk.jshell.spi
Defines the Service Provider Interface for pluggable JShell execution engines.
The JShell core tracks and compiles Snippets then sends them
(represented in a wrapper class) to the execution engine for loading,
and in the case of executable Snippets, execution. The JShell
implementation includes a default execution engine (currently a remote
process which is JDI controlled). By implementing the
ExecutionControl
interface and its generating class,
an implementation of the ExecutionControlProvider
interface, and installing it with
JShell.Builder.executionEngine(String)
other execution engines can be used. Where the passed String is an
ExecutionControl
spec.
The ExecutionControl
spec is the ExecutionControlProvider
name optionally followed by a parameter specification.
The syntax of the spec is:
spec := name : params | name name := identifier params := param , params | param | param := identifier ( value )Where 'name' is the
ExecutionControlProvider
name.
Where 'param' is a Map key from
ExecutionControlProvider.defaultParameters()
and the parenthesized
value; See, for example,
JdiExecutionControlProvider
.
Where 'identifier' is a sequence of
Java identifier part characters from the Basic Multilingual Plane.
For example:
- local
- jdi:hostname(localhost)
- failover:1(jdi),2(jdi:launch(true),timeout(3000)),3(local)
- Since:
- 9
- See Also:
-
ClassDescriptionThis interface specifies the functionality that must provided to implement a pluggable JShell execution engine.Bundles class name with class bytecodes.A class install (load or redefine) encountered a problem.Unbidden execution engine termination has occurred.The abstract base of all
ExecutionControl
exceptions.An internal problem has occurred.The command is not implemented.An exception indicating that aDeclarationSnippet
with unresolved references has been encountered.The abstract base of of exceptions specific to running user code.An exception indicating that anExecutionControl.invoke(java.lang.String, java.lang.String)
(or theoretically aExecutionControl.varValue(java.lang.String, java.lang.String)
) has been interrupted by aExecutionControl.stop()
.A 'normal' user exception occurred.The provider used by JShell to generate the execution engine needed to evaluate Snippets.Functionality made available to a pluggable JShell execution engine.The construction and throw of this exception is embedded in code generated by the JShell core implementation in such a way that, upon executing aRECOVERABLE_DEFINED
user method, this exception is thrown.