- java.lang.Object
-
- jdk.jshell.execution.JdiInitiator
-
public class JdiInitiator extends Object
Sets up a JDI connection, providing the resulting JDIVirtualMachine
and theProcess
the remote agent is running in.- Since:
- 9
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Process
process()
Returns the launched process.VirtualMachine
vm()
Returns the resultingVirtualMachine
instance.
-
-
-
Constructor Detail
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) commandsremoteVMOptions
- any user requested VM command-line optionsremoteAgent
- full class name of remote agent to launchisLaunch
- does JDI do the launch? That is, LaunchingConnector, otherwise we start explicitly and use ListeningConnectorhost
- 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 Detail
vm
public VirtualMachine vm()
Returns the resultingVirtualMachine
instance.- Returns:
- the virtual machine
process
public Process process()
Returns the launched process.- Returns:
- the remote agent process
-