APIdia Launch Partner
Top Inners Fields Constructors Methods
com.sun.tools.jdi

pack-priv abstract Class AbstractLauncher

extends ConnectorImpl
implements LaunchingConnector
Class Inheritance
All Implemented Interfaces
com.sun.jdi.connect.LaunchingConnector, com.sun.jdi.connect.Connector
Known Direct Subclasses
com.sun.tools.jdi.RawCommandLineLauncher, com.sun.tools.jdi.SunCommandLineLauncher
Imports
java.io.IOException, .InterruptedIOException, java.util.ArrayList, .List, .Map, .StringTokenizer, com.sun.jdi.Bootstrap, .InternalException, .VirtualMachine, .VirtualMachineManager, com.sun.jdi.connect.Connector, .IllegalConnectorArgumentsException, .LaunchingConnector, .VMStartException, com.sun.jdi.connect.spi.Connection, .TransportService

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
AbstractLauncher.Helper

This class simply provides a context for a single launch and accept.

Field Summary

Modifier and TypeField and Description
pack-priv ThreadGroup
Inherited from com.sun.tools.jdi.ConnectorImpl:
defaultArgumentsfalseStringtrueString

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public abstract String
description()

Redeclares com.sun.jdi.connect.Connector.description.

Returns a human-readable description of this connector and its purpose.

public abstract VirtualMachine
launch(Map<String, ? extends Connector.Argument> arguments)

Redeclares com.sun.jdi.connect.LaunchingConnector.launch.

Launches an application and connects to its VM.

protected VirtualMachine
launch(String[] commandArray, String address, TransportService.ListenKey listenKey, TransportService ts)

public abstract String
name()

Redeclares com.sun.jdi.connect.Connector.name.

Returns a short identifier for the connector.

pack-priv String[]
tokenizeCommand(String command, char quote)

Inherited from com.sun.tools.jdi.ConnectorImpl:
addBooleanArgumentaddIntegerArgumentaddSelectedArgumentaddStringArgumentargumentdefaultArgumentsgetStringtoString

Field Detail

grpback to summary
pack-priv ThreadGroup grp

Constructor Detail

AbstractLauncherback to summary
pack-priv AbstractLauncher()

Method Detail

descriptionback to summary
public abstract String description()

Redeclares com.sun.jdi.connect.Connector.description.

Doc from com.sun.jdi.connect.Connector.description.

Returns a human-readable description of this connector and its purpose.

launchback to summary
public abstract VirtualMachine launch(Map<String, ? extends Connector.Argument> arguments) throws IOException, IllegalConnectorArgumentsException, VMStartException

Redeclares com.sun.jdi.connect.LaunchingConnector.launch.

Doc from com.sun.jdi.connect.LaunchingConnector.launch.

Launches an application and connects to its VM. Properties of the launch (possibly including options, main class, and arguments) are specified in arguments. The argument map associates argument name strings to instances of Connector.Argument. The default argument map for a connector can be obtained through Connector#defaultArguments. Argument map values can be changed, but map entries should not be added or deleted.

A target VM launched by a launching connector is not guaranteed to be stable until after the VMStartEvent has been received.

Important Note

If a target VM is launched through this funcctions, its output and error streams must be read as it executes. These streams are available through the Process object returned by VirtualMachine#process. If the streams are not periodically read, the target VM will stop executing when the buffers for these streams are filled.

Exceptions
IOException:
when unable to launch. Specific exceptions are dependent on the Connector implementation in use.
IllegalConnectorArgumentsException:
when one of the connector arguments is invalid.
VMStartException:
when the VM was successfully launched, but terminated with an error before a connection could be established.
launchback to summary
protected VirtualMachine launch(String[] commandArray, String address, TransportService.ListenKey listenKey, TransportService ts) throws IOException, VMStartException
nameback to summary
public abstract String name()

Redeclares com.sun.jdi.connect.Connector.name.

Doc from com.sun.jdi.connect.Connector.name.

Returns a short identifier for the connector. Connector implementors should follow similar naming conventions as are used with packages to avoid name collisions. For example, the Sun connector implementations have names prefixed with "com.sun.jdi.". Not intended for exposure to end-user.

tokenizeCommandback to summary
pack-priv String[] tokenizeCommand(String command, char quote)
com.sun.tools.jdi back to summary

private Class AbstractLauncher.Helper

extends Object
Class Inheritance

This class simply provides a context for a single launch and accept. It provides instance fields that can be used by all threads involved. This stuff can't be in the Connector proper because the connector is a singleton and is not specific to any one launch.

Field Summary

Modifier and TypeField and Description
private IOException
private final String
private final String[]
private Connection
private boolean
private TransportService.ListenKey
private Process
private TransportService

Constructor Summary

AccessConstructor and Description
pack-priv
Helper(String[] commandArray, String address, TransportService.ListenKey listenKey, TransportService ts)

Method Summary

Modifier and TypeMethod and Description
pack-priv Thread
pack-priv String
pack-priv Connection
pack-priv synchronized void
pack-priv Thread
pack-priv synchronized void
pack-priv synchronized void
pack-priv synchronized void
pack-priv Process
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

acceptExceptionback to summary
private IOException acceptException
addressback to summary
private final String address
Annotations
@SuppressWarnings:unused
commandArrayback to summary
private final String[] commandArray
connectionback to summary
private Connection connection
exitedback to summary
private boolean exited
listenKeyback to summary
private TransportService.ListenKey listenKey
processback to summary
private Process process
tsback to summary
private TransportService ts

Constructor Detail

Helperback to summary
pack-priv Helper(String[] commandArray, String address, TransportService.ListenKey listenKey, TransportService ts)

Method Detail

acceptConnectionback to summary
pack-priv Thread acceptConnection()
commandStringback to summary
pack-priv String commandString()
connectionback to summary
pack-priv Connection connection()
launchAndAcceptback to summary
pack-priv synchronized void launchAndAccept() throws IOException, VMStartException
monitorTargetback to summary
pack-priv Thread monitorTarget()
notifyOfAcceptExceptionback to summary
pack-priv synchronized void notifyOfAcceptException(IOException acceptException)
notifyOfConnectionback to summary
pack-priv synchronized void notifyOfConnection(Connection connection)
notifyOfExitback to summary
pack-priv synchronized void notifyOfExit()
processback to summary
pack-priv Process process()