Class JdiInitiator

java.lang.Object
jdk.jshell.execution.JdiInitiator
public class JdiInitiator extends Object
Sets up a JDI connection, providing the resulting JDI VirtualMachine and the Process the remote agent is running in.
Since:
9

Constructor Summary

Constructor Description
JdiInitiator(int port, List<String> remoteVMOptions, String remoteAgent, boolean isLaunch, String host, int timeout, Map<String,String> customConnectorArgs)
Start the remote agent and establish a JDI connection to it.

Method Summary

Modifier and Type Method Description
Process process()
Returns the launched process.
VirtualMachine vm()
Returns the resulting VirtualMachine instance.

Methods declared in class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Details

JdiInitiator

public JdiInitiator(int port, List<String> remoteVMOptions, String remoteAgent, boolean isLaunch, String host, int timeout, Map<String,String> customConnectorArgs)
Start the remote agent and establish a JDI connection to it.
Parameters:
port - the socket port for (non-JDI) commands
remoteVMOptions - any user requested VM command-line options
remoteAgent - full class name of remote agent to launch
isLaunch - does JDI do the launch? That is, LaunchingConnector, otherwise we start explicitly and use ListeningConnector
host - explicit hostname to use, if null use discovered hostname, applies to listening only (!isLaunch)
timeout - the start-up time-out in milliseconds. If zero or negative, will not wait thus will timeout immediately if not already started.
customConnectorArgs - custom arguments passed to the connector. These are JDI com.sun.jdi.connect.Connector arguments.

Method Details

vm

public VirtualMachine vm()
Returns the resulting VirtualMachine instance.
Returns:
the virtual machine

process

public Process process()
Returns the launched process.
Returns:
the remote agent process

© 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/JdiInitiator.html