ExecutionControlpublic 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 | 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(String host) |
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, varValueredefine, referenceTypeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddToClasspath, extensionCommand, load, setClasspath, varValuepublic static ExecutionControl.Generator launch()
LaunchingConnector.public static ExecutionControl.Generator listen(String host)
ListeningConnector.host - explicit hostname to use, if null use discovered
hostname, applies to listening only (!isLaunch)public String invoke(String classname, String methodname) throws ExecutionControl.RunException, ExecutionControl.EngineTerminationException, ExecutionControl.InternalException
ExecutionControlinvoke in interface ExecutionControlinvoke in class StreamingExecutionControlclassname - 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.RunExceptionpublic void stop()
throws ExecutionControl.EngineTerminationException,
ExecutionControl.InternalException
stop in interface ExecutionControlstop in class StreamingExecutionControlExecutionControl.EngineTerminationException - the execution engine has terminatedExecutionControl.InternalException - an internal problem occurredpublic void close()
StreamingExecutionControlclose in interface ExecutionControlclose in class StreamingExecutionControlprotected com.sun.jdi.VirtualMachine vm()
throws ExecutionControl.EngineTerminationException
JDIExecutionControlVirtualMachine instance.vm in class JDIExecutionControlExecutionControl.EngineTerminationException - if the VM is dead/disconnected
Copyright © 2015, 2016, Oracle and/or its affiliates. All rights reserved.
DRAFT 9-Ubuntu+0-9b143-1ubuntu1