public class JDIDefaultExecutionControl extends JDIExecutionControl
ExecutionControl
that the
JShell-core uses by default.
Launches a remote process -- the "remote agent".
Interfaces to the remote agent over a socket and via JDI.
Designed to work with RemoteExecutionControl
.ExecutionControl.ClassBytecodes, ExecutionControl.ClassInstallException, ExecutionControl.EngineTerminationException, ExecutionControl.ExecutionControlException, ExecutionControl.Generator, ExecutionControl.InternalException, ExecutionControl.NotImplementedException, ExecutionControl.ResolutionException, ExecutionControl.RunException, ExecutionControl.StoppedException, ExecutionControl.UserException
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the execution engine.
|
String |
invoke(String classname,
String methodname)
Invokes an executable Snippet by calling a method on the specified
wrapper class.
|
static ExecutionControl.Generator |
launch()
Creates an ExecutionControl instance based on a JDI
LaunchingConnector . |
static ExecutionControl.Generator |
listen()
Creates an ExecutionControl instance based on a JDI
ListeningConnector . |
void |
stop()
Interrupts a running remote invoke by manipulating remote variables
and sending a stop via JDI.
|
protected com.sun.jdi.VirtualMachine |
vm()
Returns the JDI
VirtualMachine instance. |
addToClasspath, extensionCommand, load, setClasspath, varValue
redefine, referenceType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addToClasspath, extensionCommand, load, setClasspath, varValue
public static ExecutionControl.Generator launch()
LaunchingConnector
.public static ExecutionControl.Generator listen()
ListeningConnector
.public String invoke(String classname, String methodname) throws ExecutionControl.RunException, ExecutionControl.EngineTerminationException, ExecutionControl.InternalException
ExecutionControl
invoke
in interface ExecutionControl
invoke
in class StreamingExecutionControl
classname
- the class whose method should be invokedmethodname
- the name of method to invokeExecutionControl.UserException
- the invoke raised a user exceptionExecutionControl.ResolutionException
- the invoke attempted to directly or
indirectly invoke an unresolved snippetExecutionControl.StoppedException
- if the invoke()
was canceled by
ExecutionControl.stop()
ExecutionControl.EngineTerminationException
- the execution engine has terminatedExecutionControl.InternalException
- an internal problem occurredExecutionControl.RunException
public void stop() throws ExecutionControl.EngineTerminationException, ExecutionControl.InternalException
stop
in interface ExecutionControl
stop
in class StreamingExecutionControl
ExecutionControl.EngineTerminationException
- the execution engine has terminatedExecutionControl.InternalException
- an internal problem occurredpublic void close()
StreamingExecutionControl
close
in interface ExecutionControl
close
in class StreamingExecutionControl
protected com.sun.jdi.VirtualMachine vm() throws ExecutionControl.EngineTerminationException
JDIExecutionControl
VirtualMachine
instance.vm
in class JDIExecutionControl
ExecutionControl.EngineTerminationException
- if the VM is dead/disconnected
Copyright © 2015, 2016, Oracle and/or its affiliates. All rights reserved.
DRAFT 9-internal+0-2016-07-19-140351.robert.dev