AutoCloseable
, ExecutionControl
JdiExecutionControl
public class StreamingExecutionControl extends Object implements ExecutionControl
ExecutionControl
execution engine SPI which streams requests to a remote agent where
execution takes place.ExecutionControl.ClassBytecodes, ExecutionControl.ClassInstallException, ExecutionControl.EngineTerminationException, ExecutionControl.ExecutionControlException, ExecutionControl.InternalException, ExecutionControl.NotImplementedException, ExecutionControl.ResolutionException, ExecutionControl.RunException, ExecutionControl.StoppedException, ExecutionControl.UserException
Constructor | Description |
---|---|
StreamingExecutionControl(ObjectOutput out,
ObjectInput in) |
Creates an instance.
|
Modifier and Type | Method | Description |
---|---|---|
void |
addToClasspath(String path) |
Adds the path to the execution class path.
|
void |
close() |
Closes the execution engine.
|
Object |
extensionCommand(String command,
Object arg) |
Run a non-standard command (or a standard command from a newer version).
|
String |
invoke(String classname,
String methodname) |
Invokes an executable Snippet by calling a method on the specified
wrapper class.
|
void |
load(ExecutionControl.ClassBytecodes[] cbcs) |
Attempts to load new classes.
|
void |
redefine(ExecutionControl.ClassBytecodes[] cbcs) |
Attempts to redefine previously loaded classes.
|
void |
stop() |
Interrupts a running invoke.
|
String |
varValue(String classname,
String varname) |
Returns the value of a variable.
|
generate, generate
public StreamingExecutionControl(ObjectOutput out, ObjectInput in)
out
- the output for commandsin
- the input for command responsespublic void load(ExecutionControl.ClassBytecodes[] cbcs) throws ExecutionControl.ClassInstallException, ExecutionControl.NotImplementedException, ExecutionControl.EngineTerminationException
ExecutionControl
load
in interface ExecutionControl
cbcs
- the class name and bytecodes to loadExecutionControl.ClassInstallException
- exception occurred loading the classes,
some or all were not loadedExecutionControl.NotImplementedException
- if not implementedExecutionControl.EngineTerminationException
- the execution engine has terminatedpublic void redefine(ExecutionControl.ClassBytecodes[] cbcs) throws ExecutionControl.ClassInstallException, ExecutionControl.NotImplementedException, ExecutionControl.EngineTerminationException
ExecutionControl
redefine
in interface ExecutionControl
cbcs
- the class name and bytecodes to redefineExecutionControl.ClassInstallException
- exception occurred redefining the classes,
some or all were not redefinedExecutionControl.NotImplementedException
- if not implementedExecutionControl.EngineTerminationException
- the execution engine has terminatedpublic String invoke(String classname, String methodname) throws ExecutionControl.RunException, ExecutionControl.EngineTerminationException, ExecutionControl.InternalException
ExecutionControl
invoke
in interface ExecutionControl
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 String varValue(String classname, String varname) throws ExecutionControl.RunException, ExecutionControl.EngineTerminationException, ExecutionControl.InternalException
ExecutionControl
varValue
in interface ExecutionControl
classname
- 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.RunException
public void addToClasspath(String path) throws ExecutionControl.EngineTerminationException, ExecutionControl.InternalException
ExecutionControl
addToClasspath
in interface ExecutionControl
path
- the path to addExecutionControl.EngineTerminationException
- the execution engine has terminatedExecutionControl.InternalException
- an internal problem occurredpublic void stop() throws ExecutionControl.EngineTerminationException, ExecutionControl.InternalException
ExecutionControl
stop
in interface ExecutionControl
ExecutionControl.EngineTerminationException
- the execution engine has terminatedExecutionControl.InternalException
- an internal problem occurredpublic Object extensionCommand(String command, Object arg) throws ExecutionControl.RunException, ExecutionControl.EngineTerminationException, ExecutionControl.InternalException
ExecutionControl
extensionCommand
in interface ExecutionControl
command
- the non-standard commandarg
- the commands argumentExecutionControl.UserException
- the command raised a user exceptionExecutionControl.ResolutionException
- the command attempted to directly or
indirectly invoke an unresolved snippetExecutionControl.StoppedException
- if the command was canceled by
ExecutionControl.stop()
ExecutionControl.EngineTerminationException
- the execution engine has terminatedExecutionControl.NotImplementedException
- if not implementedExecutionControl.InternalException
- an internal problem occurredExecutionControl.RunException
public void close()
close
in interface AutoCloseable
close
in interface ExecutionControl
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-Ubuntu+0-9b154-1