public abstract class Connector
extends java.lang.Object
Connector
interface is used to connect to a debugging session. The Connector
object is used to start the debuggee or to retrieve command line options so the extension can start the debuggee itself.
IDE providers must provide an implementation of this interface. Extension writers can access the Connector
through the Debugger.getClientConnector(Context)
and Debugger.getServerConnector(Context)
methods.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
OPTION_CLASSPATH
The key of an option in the options map for arguments required to set the classpath of Java.
|
static java.lang.String |
OPTION_DEBUG_FIRST
The key of an option in the options map for zero or more arguments which must be passed into java immediately following the switch specifying the VM.
|
static java.lang.String |
OPTION_DEBUG_LAST
The key of an option in the options map for options that are passed into Java immediately before the main class.
|
static java.lang.String |
OPTION_JAVA_EXECUTABLE
The key of the option in the options map for the absolute path of the Java executable to run.
|
static java.lang.String |
OPTION_JAVA_OPTIONS
The key of an option in the options map for options that should be passed into the java exectuable.
|
static java.lang.String |
OPTION_JVM
The key of the option in the options map for an argument passed to Java to set the VM.
|
static java.lang.String |
OPTION_MAIN_CLASS
The key of an option in the options map for the main class to run.
|
static java.lang.String |
OPTION_PROGRAM_ARGUMENTS
The key of an option in the options map for arguments passed into the java process.
|
Constructor and Description |
---|
Connector() |
Modifier and Type | Method and Description |
---|---|
abstract Context |
getContext()
Get the
Context used to create this connector. |
abstract java.util.Map |
getOptions()
Get the options the extension should use when starting the debuggee.
|
abstract boolean |
isConnected()
Check if the debugger has connected to the debuggee.
|
abstract boolean |
isFinished()
Check if the debugger has finished debugging.
|
abstract java.lang.Process |
startDebuggee(java.util.Map options)
Start the debuggee process.
|
public static final java.lang.String OPTION_JAVA_EXECUTABLE
public static final java.lang.String OPTION_JVM
public static final java.lang.String OPTION_DEBUG_FIRST
public static final java.lang.String OPTION_CLASSPATH
public static final java.lang.String OPTION_JAVA_OPTIONS
public static final java.lang.String OPTION_DEBUG_LAST
public static final java.lang.String OPTION_MAIN_CLASS
public static final java.lang.String OPTION_PROGRAM_ARGUMENTS
public abstract java.util.Map getOptions()
OPTION_JAVA_EXECUTABLE
, OPTION_JVM
, OPTION_DEBUG_FIRST
, OPTION_CLASSPATH
, OPTION_JAVA_OPTIONS
, OPTION_DEBUG_LAST
, OPTION_MAIN_CLASS
, OPTION_PROGRAM_ARGUMENTS
, and the values are String[]. Each String[] value can be null or of zero length, if no options are necessary, or an array of one or more Strings.public abstract java.lang.Process startDebuggee(java.util.Map options) throws java.io.IOException
options
can be a full set of command line options as returned getOptions()
, or it can be a partial set of options. If the options
map contains a key/value pair, the value specified will override the value that the IDE would ordinarily use for that key. If the extension does not want to override any options, the options
parameter can be null. For example, if a extension wants to add an additional program argument, it should call getOptions()
and get the value for OPTION_PROGRAM_ARGUMENTS
out of the Map. It should then create a new String[] to hold the original program arguments plus the additional program argument. It should then put this new String[] into the Map before passing it to startDebuggee
.options
- a Map of command line optionsjava.io.IOException
- if the process can not be started.public abstract boolean isConnected()
public abstract boolean isFinished()