|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bluemarsh.jswat.VMConnection
Class VMConnection contains the parameters necessary for making and maintaining a connection to a debuggee VM. It provides methods for constructing a connection and launching a debuggee VM.
Field Summary | |
protected com.sun.jdi.connect.Connector |
connector
Connector. |
protected java.util.Map |
connectorArgs
Connector arguments. |
protected com.sun.jdi.VirtualMachine |
debuggeeVM
Debuggee VM. |
Constructor Summary | |
VMConnection(com.sun.jdi.connect.Connector connector,
java.util.Map args)
Constructs a new VMConnection with the given connector and arguments. |
Method Summary | |
boolean |
attachDebuggee(Session session)
Attaches to a remote debuggee using this connection. |
static VMConnection |
buildConnection(java.lang.String name)
Builds the connection parameters object using the given shared memory name for the debuggee VM. |
static VMConnection |
buildConnection(java.lang.String host,
java.lang.String port)
Builds the connection parameters object using the given host and port for the remote debuggee VM. |
static VMConnection |
buildConnection(java.lang.String javaHome,
java.lang.String jvmExecutable,
java.lang.String options,
java.lang.String cmdline)
Builds a VMConnection object to contain all the necessary parameters for launching a debuggee VM. |
protected static void |
dumpStream(java.io.InputStream is,
Log out)
Dumps the contents of the input stream to the message log. |
boolean |
equals(java.lang.Object o)
Indicates whether some other object is "equal to" this one. |
java.lang.String |
getConnectArg(java.lang.String name)
Returns the named connector argument. |
java.util.Map |
getConnectArgs()
Returns the connector arguments used to launch, listen, or attach to the debuggee VM. |
com.sun.jdi.connect.Connector |
getConnector()
Returns the connector used to launch, listen, or attach to the debuggee VM. |
java.lang.String |
getMainClass()
Returns the "main" connector argument. |
com.sun.jdi.VirtualMachine |
getVM()
Returns the debuggee VirtualMachine associated with this connection. |
boolean |
launchDebuggee(Session session)
Launches the debuggee VM using this connection. |
void |
setVM(com.sun.jdi.VirtualMachine vm)
Sets the VirtualMachine that is associated with this connection. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected com.sun.jdi.connect.Connector connector
protected java.util.Map connectorArgs
protected com.sun.jdi.VirtualMachine debuggeeVM
Constructor Detail |
public VMConnection(com.sun.jdi.connect.Connector connector, java.util.Map args)
connector
- connector.args
- connector arguments.Method Detail |
public boolean attachDebuggee(Session session)
session
- Session to activate when attached.public static VMConnection buildConnection(java.lang.String name) throws NoAttachingConnectorException
name
- shared memory name.NoAttachingConnectorException
- Thrown if the appropriate connector could not be found.public static VMConnection buildConnection(java.lang.String host, java.lang.String port) throws NoAttachingConnectorException
host
- Host machine name.port
- Port of remote machine.NoAttachingConnectorException
- Thrown if the appropriate connector could not be found.public static VMConnection buildConnection(java.lang.String javaHome, java.lang.String jvmExecutable, java.lang.String options, java.lang.String cmdline)
javaHome
- home of JVM or null for default.jvmExecutable
- name of JVM executable file or null for default.options
- VM options to pass or null for none.cmdline
- class to launch (with optional arguments).protected static void dumpStream(java.io.InputStream is, Log out) throws java.io.IOException
is
- input stream to read from.out
- output Log to dump to.java.io.IOException
- Thrown if error occurs.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- the reference object with which to compare.public com.sun.jdi.connect.Connector getConnector()
com.sun.jdi.connect.Connector
subclasses.public java.util.Map getConnectArgs()
public java.lang.String getConnectArg(java.lang.String name)
name
- name of argument to retrieve.public java.lang.String getMainClass()
public com.sun.jdi.VirtualMachine getVM()
public boolean launchDebuggee(Session session)
session
- Session to activate.public void setVM(com.sun.jdi.VirtualMachine vm)
vm
- VirtualMachine.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |