Module jdk.jshell

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
  • Method Details

    • 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.