AutoCloseable, ExecutionControlpublic class RemoteExecutionControl extends DirectExecutionControl implements ExecutionControl
DirectExecutionControl which adds stop support controlled by
an external process. Designed to work with JdiDefaultExecutionControl.ExecutionControl.ClassBytecodes, ExecutionControl.ClassInstallException, ExecutionControl.EngineTerminationException, ExecutionControl.ExecutionControlException, ExecutionControl.InternalException, ExecutionControl.NotImplementedException, ExecutionControl.ResolutionException, ExecutionControl.RunException, ExecutionControl.StoppedException, ExecutionControl.UserException| Constructor | Description |
|---|---|
RemoteExecutionControl() |
Create an instance using the default class loading.
|
RemoteExecutionControl(LoaderDelegate loaderDelegate) |
Creates an instance, delegating loader operations to the specified
delegate.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
clientCodeEnter() |
Marks entry into user code.
|
protected void |
clientCodeLeave() |
Marks departure from user code.
|
protected String |
invoke(Method doitMethod) |
Invoke the specified "doit-method", a static method with no parameters.
|
static void |
main(String[] args) |
Launch the agent, connecting to the JShell-core over the socket specified
in the command-line argument.
|
void |
stop() |
Interrupts a running invoke.
|
protected String |
throwConvertedInvocationException(Throwable cause) |
Converts incoming exceptions in user code into instances of subtypes of
ExecutionControl.ExecutionControlException and throws the
converted exception. |
protected String |
throwConvertedOtherException(Throwable ex) |
Converts incoming exceptions in agent code into instances of subtypes of
ExecutionControl.ExecutionControlException and throws the
converted exception. |
String |
varValue(String className,
String varName) |
Returns the value of a variable.
|
addToClasspath, close, extensionCommand, findClass, invoke, load, redefine, valueStringaddToClasspath, close, extensionCommand, generate, generate, invoke, load, redefinepublic RemoteExecutionControl(LoaderDelegate loaderDelegate)
loaderDelegate - the delegate to handle loading classespublic RemoteExecutionControl()
public static void main(String[] args) throws Exception
args - standard command-line arguments, expectation is the socket
number is the only argumentException - any unexpected exceptionpublic void stop()
throws ExecutionControl.EngineTerminationException,
ExecutionControl.InternalException
DirectExecutionControlNot supported.
stop in interface ExecutionControlstop in class DirectExecutionControlExecutionControl.EngineTerminationException - the execution engine has terminatedExecutionControl.InternalException - an internal problem occurredprotected String invoke(Method doitMethod) throws Exception
DirectExecutionControlDirectExecutionControl.invoke(java.lang.String, java.lang.String)
in this class will call this to invoke.invoke in class DirectExecutionControldoitMethod - the Method to invokeException - any exceptions thrown by
Method.invoke(Object, Object...)
or any ExecutionControl.ExecutionControlException
to pass-through.public String varValue(String className, String varName) throws ExecutionControl.RunException, ExecutionControl.EngineTerminationException, ExecutionControl.InternalException
ExecutionControlvarValue in interface ExecutionControlvarValue in class DirectExecutionControlclassName - the name of the wrapper class of the variablevarName - the name of the variableExecutionControl.UserException - formatting the value raised a user exceptionExecutionControl.ResolutionException - formatting the value attempted to directly or
indirectly invoke an unresolved snippetExecutionControl.StoppedException - if the formatting the value was canceled by
ExecutionControl.stop()ExecutionControl.EngineTerminationException - the execution engine has terminatedExecutionControl.InternalException - an internal problem occurredExecutionControl.RunExceptionprotected String throwConvertedInvocationException(Throwable cause) throws ExecutionControl.RunException, ExecutionControl.InternalException
DirectExecutionControlExecutionControl.ExecutionControlException and throws the
converted exception.throwConvertedInvocationException in class DirectExecutionControlcause - the exception to convertExecutionControl.RunException - for normal exception occurrencesExecutionControl.InternalException - for internal problemsprotected String throwConvertedOtherException(Throwable ex) throws ExecutionControl.RunException, ExecutionControl.InternalException
DirectExecutionControlExecutionControl.ExecutionControlException and throws the
converted exception.throwConvertedOtherException in class DirectExecutionControlex - the exception to convertExecutionControl.RunException - for normal exception occurrencesExecutionControl.InternalException - for internal problemsprotected void clientCodeEnter()
DirectExecutionControlclientCodeEnter in class DirectExecutionControlprotected void clientCodeLeave()
throws ExecutionControl.InternalException
DirectExecutionControlclientCodeLeave in class DirectExecutionControlExecutionControl.InternalException - in unexpected failure cases Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 2015, 2017, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.
DRAFT 9-Debian+0-9b153-2