ExecutionControlProvider (Java SE 11 & JDK 11 ) (original) (raw)
- All Known Implementing Classes:
[FailOverExecutionControlProvider](../execution/FailOverExecutionControlProvider.html "class in jdk.jshell.execution")
,[JdiExecutionControlProvider](../execution/JdiExecutionControlProvider.html "class in jdk.jshell.execution")
,[LocalExecutionControlProvider](../execution/LocalExecutionControlProvider.html "class in jdk.jshell.execution")
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
Method Summary
All Methods Instance Methods Abstract Methods Default Methods
Modifier and Type Method Description default Map<String,String> defaultParameters() Create and return the default parameter map for thisExecutionControlProvider. ExecutionControl generate(ExecutionEnv env,Map<String,String> parameters) Create and return the ExecutionControl instance. String name() The unique name of this ExecutionControlProvider. Method Detail
* #### name [String](../../../../java.base/java/lang/String.html "class in java.lang") 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)](../../../../java.base/java/lang/Character.html#isJavaIdentifierPart%28char%29). Returns: the ExecutionControlProvider's name * #### defaultParameters default [Map](../../../../java.base/java/util/Map.html "interface in java.util")<[String](../../../../java.base/java/lang/String.html "class in java.lang"),[String](../../../../java.base/java/lang/String.html "class in java.lang")> 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)](#generate%28jdk.jshell.spi.ExecutionEnv,java.util.Map%29). Returns: the default parameter map * #### generate [ExecutionControl](ExecutionControl.html "interface in jdk.jshell.spi") generate([ExecutionEnv](ExecutionEnv.html "interface in jdk.jshell.spi") env, [Map](../../../../java.base/java/util/Map.html "interface in java.util")<[String](../../../../java.base/java/lang/String.html "class in java.lang"),[String](../../../../java.base/java/lang/String.html "class in java.lang")> parameters) throws [Throwable](../../../../java.base/java/lang/Throwable.html "class in java.lang") Create and return the `ExecutionControl` instance. Parameters: `env` \- the execution environment, provided by JShell `parameters` \- the [default](#defaultParameters%28%29) or modified parameter map. Returns: the execution engine Throws: `[Throwable](../../../../java.base/java/lang/Throwable.html "class in java.lang")` \- an exception that occurred attempting to create the execution engine.
Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2025, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.