APIdia Launch Partner
Top Description Inners Methods
com.sun.jdi.connect

public Interface Connector

Known Direct Subinterfaces
com.sun.jdi.connect.LaunchingConnector, com.sun.jdi.connect.ListeningConnector, com.sun.jdi.connect.AttachingConnector
Known Direct Implementers
com.sun.tools.jdi.ConnectorImpl
Imports
java.io.Serializable, java.util.List, .Map

A method of connection between a debugger and a target VM. A connector encapsulates exactly one Transport. used to establish the connection. Each connector has a set of arguments which controls its operation. The arguments are stored as a map, keyed by a string. Each implementation defines the string argument keys it accepts.
Author
Gordon Hirsch
Since
1.3
See Also
LaunchingConnector, AttachingConnector, ListeningConnector, Connector.Argument

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
Connector.Argument

Specification for and value of a Connector argument.

public static interface
Connector.BooleanArgument

Specification for and value of a Connector argument, whose value is Boolean.

public static interface
Connector.IntegerArgument

Specification for and value of a Connector argument, whose value is an integer.

public static interface
Connector.SelectedArgument

Specification for and value of a Connector argument, whose value is a String selected from a list of choices.

public static interface
Connector.StringArgument

Specification for and value of a Connector argument, whose value is a String.

Method Summary

Modifier and TypeMethod and Description
public Map<String, Connector.Argument>

Returns:

the map associating argument names with argument information and default value.
defaultArguments
()

Returns the arguments accepted by this Connector and their default values.

public String

Returns:

the description of this connector
description
()

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

public String

Returns:

the name of this connector.
name
()

Returns a short identifier for the connector.

public Transport

Returns:

the Transport used by this connector.
transport
()

Returns the transport mechanism used by this connector to establish connections with a target VM.

Method Detail

defaultArgumentsback to summary
public Map<String, Connector.Argument> defaultArguments()

Returns the arguments accepted by this Connector and their default values. The keys of the returned map are string argument names. The values are Connector.Argument containing information about the argument and its default value.

Returns:Map<String, Connector.Argument>

the map associating argument names with argument information and default value.

descriptionback to summary
public String description()

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

Returns:String

the description of this connector

nameback to summary
public String 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.

Returns:String

the name of this connector.

transportback to summary
public Transport transport()

Returns the transport mechanism used by this connector to establish connections with a target VM.

Returns:Transport

the Transport used by this connector.

com.sun.jdi.connect back to summary

public Interface Connector.Argument

extends Serializable
Known Direct Subinterfaces
com.sun.jdi.connect.Connector.BooleanArgument, com.sun.jdi.connect.Connector.IntegerArgument, com.sun.jdi.connect.Connector.StringArgument, com.sun.jdi.connect.Connector.SelectedArgument
Known Direct Implementers
com.sun.tools.jdi.ConnectorImpl.ArgumentImpl

Specification for and value of a Connector argument. Will always implement a subinterface of Argument: Connector.StringArgument, Connector.BooleanArgument, Connector.IntegerArgument, or Connector.SelectedArgument.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the description of this argument
description
()

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

public boolean

Returns:

true if the value is valid to be used in setValue(String)
isValid
(String value)

Performs basic sanity check of argument.

public String

Returns:

a label for this argument
label
()

Returns a short human-readable label for this argument.

public boolean

Returns:

true if the argument must be specified; false otherwise.
mustSpecify
()

Indicates whether the argument must be specified.

public String

Returns:

the name of this argument.
name
()

Returns a short, unique identifier for the argument.

public void
setValue(String value)

Sets the value of the argument.

public String

Returns:

the current value of the argument.
value
()

Returns the current value of the argument.

Method Detail

descriptionback to summary
public String description()

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

Returns:String

the description of this argument

isValidback to summary
public boolean isValid(String value)

Performs basic sanity check of argument.

Returns:boolean

true if the value is valid to be used in setValue(String)

labelback to summary
public String label()

Returns a short human-readable label for this argument.

Returns:String

a label for this argument

mustSpecifyback to summary
public boolean mustSpecify()

Indicates whether the argument must be specified. If true, setValue must be used to set a non-null value before using this argument in establishing a connection.

Returns:boolean

true if the argument must be specified; false otherwise.

nameback to summary
public String name()

Returns a short, unique identifier for the argument. Not intended for exposure to end-user.

Returns:String

the name of this argument.

setValueback to summary
public void setValue(String value)

Sets the value of the argument. The value should be checked with isValid(String) before setting it; invalid values will throw an exception when the connection is established - for example, on LaunchingConnector#launch

valueback to summary
public String value()

Returns the current value of the argument. Initially, the default value is returned. If the value is currently unspecified, null is returned.

Returns:String

the current value of the argument.

com.sun.jdi.connect back to summary

public Interface Connector.BooleanArgument

extends Argument
Known Direct Implementers
com.sun.tools.jdi.ConnectorImpl.BooleanArgumentImpl

Specification for and value of a Connector argument, whose value is Boolean. Boolean values are represented by the localized versions of the strings "true" and "false".

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

the value of the argument as a boolean.
booleanValue
()

Return the value of the argument as a boolean.

public boolean

Returns:

true if value is a string representation of a boolean value.
isValid
(String value)

Redeclares com.sun.jdi.connect.Connector.Argument.isValid.

Performs basic sanity check of argument.

public void
setValue(boolean value)

Sets the value of the argument.

public String

Returns:

the localized String representation of the boolean value.
stringValueOf
(boolean value)

Return the string representation of the value parameter.

Inherited from com.sun.jdi.connect.Connector.Argument:
descriptionlabelmustSpecifynamesetValuevalue

Method Detail

booleanValueback to summary
public boolean booleanValue()

Return the value of the argument as a boolean. Since the argument may not have been set or may have an invalid value isValid(String) should be called on value() to check its validity. If it is invalid the boolean returned by this method is undefined.

Returns:boolean

the value of the argument as a boolean.

isValidback to summary
public boolean isValid(String value)

Redeclares com.sun.jdi.connect.Connector.Argument.isValid.

Performs basic sanity check of argument.

Returns:boolean

true if value is a string representation of a boolean value.

See Also
stringValueOf(boolean)
setValueback to summary
public void setValue(boolean value)

Sets the value of the argument.

stringValueOfback to summary
public String stringValueOf(boolean value)

Return the string representation of the value parameter. Does not set or examine the current value of this instance.

Returns:String

the localized String representation of the boolean value.

com.sun.jdi.connect back to summary

public Interface Connector.IntegerArgument

extends Argument
Known Direct Implementers
com.sun.tools.jdi.ConnectorImpl.IntegerArgumentImpl

Specification for and value of a Connector argument, whose value is an integer. Integer values are represented by their corresponding strings.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the value of the argument as a int.
intValue
()

Return the value of the argument as a int.

public boolean

Returns:

true if value represents an int that is min() <= value <= max()
isValid
(String value)

Redeclares com.sun.jdi.connect.Connector.Argument.isValid.

Performs basic sanity check of argument.

public boolean

Returns:

true if min() <= value <= max()
isValid
(int value)

Performs basic sanity check of argument.

public int

Returns:

the maximum allowed value for this argument.
max
()

The upper bound for the value.

public int

Returns:

the minimum allowed value for this argument.
min
()

The lower bound for the value.

public void
setValue(int value)

Sets the value of the argument.

public String

Returns:

the String representation of the int value.
stringValueOf
(int value)

Return the string representation of the value parameter.

Inherited from com.sun.jdi.connect.Connector.Argument:
descriptionlabelmustSpecifynamesetValuevalue

Method Detail

intValueback to summary
public int intValue()

Return the value of the argument as a int. Since the argument may not have been set or may have an invalid value isValid(String) should be called on value() to check its validity. If it is invalid the int returned by this method is undefined.

Returns:int

the value of the argument as a int.

isValidback to summary
public boolean isValid(String value)

Redeclares com.sun.jdi.connect.Connector.Argument.isValid.

Performs basic sanity check of argument.

Returns:boolean

true if value represents an int that is min() <= value <= max()

isValidback to summary
public boolean isValid(int value)

Performs basic sanity check of argument.

Returns:boolean

true if min() <= value <= max()

maxback to summary
public int max()

The upper bound for the value.

Returns:int

the maximum allowed value for this argument.

minback to summary
public int min()

The lower bound for the value.

Returns:int

the minimum allowed value for this argument.

setValueback to summary
public void setValue(int value)

Sets the value of the argument. The value should be checked with isValid(int) before setting it; invalid values will throw an exception when the connection is established - for example, on LaunchingConnector#launch

stringValueOfback to summary
public String stringValueOf(int value)

Return the string representation of the value parameter. Does not set or examine the current value of this instance.

Returns:String

the String representation of the int value.

com.sun.jdi.connect back to summary

public Interface Connector.SelectedArgument

extends Argument
Known Direct Implementers
com.sun.tools.jdi.ConnectorImpl.SelectedArgumentImpl

Specification for and value of a Connector argument, whose value is a String selected from a list of choices.

Method Summary

Modifier and TypeMethod and Description
public List<String>

Returns:

List of String
choices
()

Return the possible values for the argument

public boolean

Returns:

true if value is one of choices().
isValid
(String value)

Redeclares com.sun.jdi.connect.Connector.Argument.isValid.

Performs basic sanity check of argument.

Inherited from com.sun.jdi.connect.Connector.Argument:
descriptionlabelmustSpecifynamesetValuevalue

Method Detail

choicesback to summary
public List<String> choices()

Return the possible values for the argument

Returns:List<String>

List of String

isValidback to summary
public boolean isValid(String value)

Redeclares com.sun.jdi.connect.Connector.Argument.isValid.

Performs basic sanity check of argument.

Returns:boolean

true if value is one of choices().

com.sun.jdi.connect back to summary

public Interface Connector.StringArgument

extends Argument
Known Direct Implementers
com.sun.tools.jdi.ConnectorImpl.StringArgumentImpl

Specification for and value of a Connector argument, whose value is a String.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true always
isValid
(String value)

Redeclares com.sun.jdi.connect.Connector.Argument.isValid.

Performs basic sanity check of argument.

Inherited from com.sun.jdi.connect.Connector.Argument:
descriptionlabelmustSpecifynamesetValuevalue

Method Detail

isValidback to summary
public boolean isValid(String value)

Redeclares com.sun.jdi.connect.Connector.Argument.isValid.

Performs basic sanity check of argument.

Returns:boolean

true always