Class LocalExecutionControlProvider
java.lang.Object
jdk.jshell.execution.LocalExecutionControlProvider
- All Implemented Interfaces:
ExecutionControlProvider
public class LocalExecutionControlProvider extends Object implements ExecutionControlProvider
A provider of execution engines which run in the same process as JShell.
- Since:
- 9
Constructor Summary
Constructor | Description |
---|---|
LocalExecutionControlProvider() |
Create an instance. |
Method Summary
Modifier and Type | Method | Description |
---|---|---|
Map<String, |
defaultParameters() |
Create and return the default parameter map for LocalExecutionControlProvider . |
ExecutionControl |
generate |
Create and return a locally executing ExecutionControl instance. |
String |
name() |
The unique name of this ExecutionControlProvider . |
Constructor Details
LocalExecutionControlProvider
public LocalExecutionControlProvider()
Create an instance. An instance can be used to generate an
ExecutionControl
instance that executes code in the same process.Method Details
name
public String name()
The unique name of this
ExecutionControlProvider
.- Specified by:
-
name
in interfaceExecutionControlProvider
- Returns:
- "local"
defaultParameters
public Map<String,String> defaultParameters()
Create and return the default parameter map for
LocalExecutionControlProvider
. LocalExecutionControlProvider
has no parameters.- Specified by:
-
defaultParameters
in interfaceExecutionControlProvider
- Returns:
- an empty parameter map
generate
public ExecutionControl generate(ExecutionEnv env, Map<String,String> parameters)
Create and return a locally executing
ExecutionControl
instance.- Specified by:
-
generate
in interfaceExecutionControlProvider
- Parameters:
-
env
- the execution environment, provided by JShell -
parameters
- the default or modified parameter map. - Returns:
- the execution engine
© 1993, 2021, 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/17/docs/api/jdk.jshell/jdk/jshell/execution/LocalExecutionControlProvider.html