Interface ExecutionControlProvider

All Known Implementing Classes:
FailOverExecutionControlProvider, JdiExecutionControlProvider, LocalExecutionControlProvider
public interface ExecutionControlProvider

The provider used by JShell to generate the execution engine needed to evaluate Snippets. Alternate execution engines can be created by implementing this interface, then configuring JShell with the provider or the providers name and parameter specifier.

Since:
9

Methods

Modifier and Type Method Description
default Map<String,​String> defaultParameters()

Create and return the default parameter map for this ExecutionControlProvider.

ExecutionControl generate​(ExecutionEnv env, Map<String,​String> parameters)

Create and return the ExecutionControl instance.

String name()

The unique name of this ExecutionControlProvider.

Methods

name

String name()

The unique name of this ExecutionControlProvider. The name must be a sequence of characters from the Basic Multilingual Plane which are Character.isJavaIdentifierPart(char).

Returns:
the ExecutionControlProvider's name

defaultParameters

default Map<String,String> defaultParameters()

Create and return the default parameter map for this ExecutionControlProvider. The map can optionally be modified; Modified or unmodified it can be passed to generate(jdk.jshell.spi.ExecutionEnv, java.util.Map).

Returns:
the default parameter map

generate

ExecutionControl generate(ExecutionEnv env,
                          Map<String,​String> parameters)
                   throws Throwable

Create and return the ExecutionControl instance.

Parameters:
env - the execution environment, provided by JShell
parameters - the default or modified parameter map.
Returns:
the execution engine
Throws:
Throwable - an exception that occurred attempting to create the execution engine.

© 1993, 2020, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/11/docs/api/jdk.jshell/jdk/jshell/spi/ExecutionControlProvider.html