public class

VirtualMachineManagerImpl

extends Object
implements VirtualMachineManagerService
java.lang.Object
   ↳ com.sun.tools.jdi.VirtualMachineManagerImpl

Summary

Protected Constructors
VirtualMachineManagerImpl()
Public Methods
void addConnector(Connector connector)
Adds a connector to the list of known connectors.
void addVirtualMachine(VirtualMachine vm)
List<Connector> allConnectors()
Returns the list of all known Connector objects.
List<AttachingConnector> attachingConnectors()
Returns the list of known AttachingConnector objects.
List<VirtualMachine> connectedVirtualMachines()
Lists all target VMs which are connected to the debugger.
VirtualMachine createVirtualMachine(Connection connection)
Creates a new virtual machine.
synchronized VirtualMachine createVirtualMachine(Connection connection, Process process)
Create a virtual machine mirror for a target VM.
LaunchingConnector defaultConnector()
Identifies the default connector.
List<LaunchingConnector> launchingConnectors()
Returns the list of known LaunchingConnector objects.
List<ListeningConnector> listeningConnectors()
Returns the list of known ListeningConnector objects.
int majorInterfaceVersion()
Returns the major version number of the JDI interface.
int minorInterfaceVersion()
Returns the minor version number of the JDI interface.
void removeConnector(Connector connector)
Removes a connector from the list of known connectors.
void setDefaultConnector(LaunchingConnector connector)
Replaces the default connector.
static VirtualMachineManager virtualMachineManager()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.sun.jdi.VirtualMachineManager
From interface com.sun.tools.jdi.VirtualMachineManagerService

Protected Constructors

protected VirtualMachineManagerImpl ()

Public Methods

public void addConnector (Connector connector)

Adds a connector to the list of known connectors.

Parameters
connector the connector to be added

public void addVirtualMachine (VirtualMachine vm)

public List<Connector> allConnectors ()

Returns the list of all known Connector objects.

Returns

public List<AttachingConnector> attachingConnectors ()

Returns the list of known AttachingConnector objects. Any of the returned objects can be used to attach to an existing target VM and create a VirtualMachine mirror for it.

Returns

public List<VirtualMachine> connectedVirtualMachines ()

Lists all target VMs which are connected to the debugger. The list includes VirtualMachine instances for any target VMs which initiated a connection and any target VMs to which this manager has initiated a connection. A target VM will remain in this list until the VM is disconnected. VMDisconnectEvent is placed in the event queue after the VM is removed from the list.

Returns

public VirtualMachine createVirtualMachine (Connection connection)

Creates a new virtual machine.

This convenience method works as if by invoking createVirtualMachine(Connection, Process) method and specifying null as the process argument.

This method exists so that Connectors may create a virtual machine mirror when a connection is established to a target VM. Only developers creating new Connector implementations should need to make direct use of this method.

Returns
  • the new virtual machine
Throws
IOException

public synchronized VirtualMachine createVirtualMachine (Connection connection, Process process)

Create a virtual machine mirror for a target VM.

Creates a virtual machine mirror for a target VM for which a Connection already exists. A Connection is created when a Connector establishes a connection and successfully handshakes with a target VM. A Connector can then use this method to create a virtual machine mirror to represent the composite state of the target VM.

The process argument specifies the Process object for the taget VM. It may be specified as null. If the target VM is launched by a LaunchingConnector the process argument should be specified, otherwise calling process() on the created virtual machine will return null.

This method exists so that Connectors may create a virtual machine mirror when a connection is established to a target VM. Only developers creating new Connector implementations should need to make direct use of this method.

Parameters
connection The open connection to the target VM.
process If launched, the Process object for the target VM. null if not launched.
Returns
  • new virtual machine representing the target VM.
Throws
IOException

public LaunchingConnector defaultConnector ()

Identifies the default connector. This connector should be used as the launching connector when selection of a connector with specific characteristics is unnecessary.

Returns

public List<LaunchingConnector> launchingConnectors ()

Returns the list of known LaunchingConnector objects. Any of the returned objects can be used to launch a new target VM and immediately create a VirtualMachine mirror for it. Note that a target VM launched by a launching connector is not guaranteed to be stable until after the VMStartEvent has been received.

Returns

public List<ListeningConnector> listeningConnectors ()

Returns the list of known ListeningConnector objects. Any of the returned objects can be used to listen for a connection initiated by a target VM and create a VirtualMachine mirror for it.

Returns

public int majorInterfaceVersion ()

Returns the major version number of the JDI interface. See version() target VM version and information and description() more version information.

Returns
  • the integer major version number.

public int minorInterfaceVersion ()

Returns the minor version number of the JDI interface. See version() target VM version and information and description() more version information.

Returns
  • the integer minor version number

public void removeConnector (Connector connector)

Removes a connector from the list of known connectors.

Parameters
connector the connector to be removed

public void setDefaultConnector (LaunchingConnector connector)

Replaces the default connector.

Parameters
connector the new default connector
Returns

public static VirtualMachineManager virtualMachineManager ()