net.groboclown.util.jpda.v1
Class JpdaConnectorFactory

java.lang.Object
  |
  +--net.groboclown.util.jpda.v1.JpdaConnectorFactory

public class JpdaConnectorFactory
extends Object

Creates a JpdaConnection to a VM using JDI (from JPDA). Currently, the only supported creation is via launching a new VM.


Field Summary
private static String[] EXEC_ARGUMENT_ORDER
           
private static String[] KNOWN_ARGUMENTS
           
private static String MAIN_ARGUMENT
           
private static String OPTIONS_ARGUMENT
           
private static String QUOTE_ARGUMENT
           
protected static JpdaConnectorFactory s_instance
           
private static String SUSPEND_ARGUMENT
           
private  VirtualMachineManager vmm
           
 
Constructor Summary
protected JpdaConnectorFactory()
          Constructor - set to protected so that only subclasses can use it.
 
Method Summary
static JpdaConnectorFactory getInstance()
          Retrieve the singleton instance.
 JpdaConnector launchVM(Class mainClass, String[] args)
           
 JpdaConnector launchVM(Class mainClass, String[] args, String[] vmArgs, String classpath, char quote, boolean suspend)
          Create a new Connector by launching a new VM.
protected  void setArgument(Map args, String key, String newValue)
           
protected  void setupArguments(Map map, Class mainClass, String[] args, String[] vmArgs, String classpath, char quote, boolean suspend)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

s_instance

protected static JpdaConnectorFactory s_instance

vmm

private VirtualMachineManager vmm

MAIN_ARGUMENT

private static final String MAIN_ARGUMENT

SUSPEND_ARGUMENT

private static final String SUSPEND_ARGUMENT

OPTIONS_ARGUMENT

private static final String OPTIONS_ARGUMENT

QUOTE_ARGUMENT

private static final String QUOTE_ARGUMENT

KNOWN_ARGUMENTS

private static final String[] KNOWN_ARGUMENTS

EXEC_ARGUMENT_ORDER

private static final String[] EXEC_ARGUMENT_ORDER
Constructor Detail

JpdaConnectorFactory

protected JpdaConnectorFactory()
Constructor - set to protected so that only subclasses can use it.
Method Detail

getInstance

public static JpdaConnectorFactory getInstance()
Retrieve the singleton instance.

launchVM

public JpdaConnector launchVM(Class mainClass,
                              String[] args)

launchVM

public JpdaConnector launchVM(Class mainClass,
                              String[] args,
                              String[] vmArgs,
                              String classpath,
                              char quote,
                              boolean suspend)
Create a new Connector by launching a new VM. The new VM will execute the given main class with the given args. The VM will execute with the given VM arguments and classpath.

setupArguments

protected void setupArguments(Map map,
                              Class mainClass,
                              String[] args,
                              String[] vmArgs,
                              String classpath,
                              char quote,
                              boolean suspend)
                       throws IllegalConnectorArgumentsException

setArgument

protected void setArgument(Map args,
                           String key,
                           String newValue)
                    throws IllegalConnectorArgumentsException


Written under the LGPL