RFR: 8319311: JShell Process Builder should be configurable
Jan Lahoda
jlahoda at openjdk.org
Mon Nov 13 07:58:17 UTC 2023
JShell has a two parts: the main process, which compiles the user's snippets, and possibly interacts with the user, and an "agent" that executes the executable code produced from the snippets. Then "agent" is typically (although not necessarily) a separate process. The clients of the JShell API are free to override the agent behavior, selecting either from the list of existing agents, or creating their own.
There is, however, a desire to use agent that is mostly equivalent to the default JDI-based agent, but with some adjustments.
This patch proposes to limit the amount of code needed to create an agent derived from the default agent.
The solution has two parts:
- a new interface, JdiStarter is created, which the API client can use to provide code that starts the external JVM for snippet execution
- the existing JdiInitiator is enhanced so that the user can override the process creation itself.
Please also review the CSR:
https://bugs.openjdk.org/browse/JDK-8319923
-------------
Commit messages:
- adding test
- Various fixes
- Fixing behavior when parameters map does not contain entry for the launch parameter.
- Adding javadoc.
- Making listen process overridable in JdiInitiator.
- 8319311: JShell Process Builder should be configurable
Changes: https://git.openjdk.org/jdk/pull/16627/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16627&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8319311
Stats: 262 lines in 4 files changed: 226 ins; 21 del; 15 mod
Patch: https://git.openjdk.org/jdk/pull/16627.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/16627/head:pull/16627
PR: https://git.openjdk.org/jdk/pull/16627
More information about the kulla-dev
mailing list