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
ExecutionControlinterface and its generating class, an implementation of the
ExecutionControlProviderinterface, and installing it with
JShell.Builder.executionEngine(String)other execution engines can be used. Where the passed String is an
ExecutionControl spec is the
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
ExecutionControlProvidername. 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.
- See Also:
for execution implementation support
Interface Summary Interface Description ExecutionControlThis interface specifies the functionality that must provided to implement a pluggable JShell execution engine. ExecutionControlProviderThe provider used by JShell to generate the execution engine needed to evaluate Snippets. ExecutionEnvFunctionality made available to a pluggable JShell execution engine.
Class Summary Class Description ExecutionControl.ClassBytecodesBundles class name with class bytecodes.
Exception Summary Exception Description ExecutionControl.ClassInstallExceptionA class install (load or redefine) encountered a problem. ExecutionControl.EngineTerminationExceptionUnbidden execution engine termination has occurred. ExecutionControl.ExecutionControlExceptionThe abstract base of all
ExecutionControl.InternalExceptionAn internal problem has occurred. ExecutionControl.NotImplementedExceptionThe command is not implemented. ExecutionControl.ResolutionExceptionAn exception indicating that a
DeclarationSnippetwith unresolved references has been encountered.
ExecutionControl.RunExceptionThe abstract base of of exceptions specific to running user code. ExecutionControl.StoppedExceptionAn exception indicating that an
ExecutionControl.invoke(java.lang.String, java.lang.String)(or theoretically a
ExecutionControl.varValue(java.lang.String, java.lang.String)) has been interrupted by a
ExecutionControl.UserExceptionA 'normal' user exception occurred. SPIResolutionExceptionThe construction and throw of this exception is embedded in code generated by the JShell core implementation in such a way that, upon executing a
RECOVERABLE_DEFINEDuser method, this exception is thrown.