Connector
public interface ListeningConnector extends Connector
Connector.Argument, Connector.BooleanArgument, Connector.IntegerArgument, Connector.SelectedArgument, Connector.StringArgument
Modifier and Type | Method | Description |
---|---|---|
VirtualMachine |
accept |
Waits for a target VM to attach to this connector. |
String |
startListening |
Listens for one or more connections initiated by target VMs. |
void |
stopListening |
Cancels listening for connections. |
boolean |
supportsMultipleConnections() |
Indicates whether this listening connector supports multiple connections for a single argument map. |
defaultArguments, description, name, transport
boolean supportsMultipleConnections()
startListening(java.util.Map<java.lang.String, ? extends com.sun.jdi.connect.Connector.Argument>)
may allow multiple target VM to become connected.true
if multiple connections are supported; false
otherwise.String startListening(Map<String,? extends Connector.Argument> arguments) throws IOException, IllegalConnectorArgumentsException
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.
This method does not return a VirtualMachine
, and, normally, returns before any target VM initiates a connection. The connected target is obtained through accept(java.util.Map<java.lang.String, ? extends com.sun.jdi.connect.Connector.Argument>)
(using the same argument map as is passed to this method).
If arguments
contains addressing information and only one connection will be accepted, the accept
method can be called immediately without calling this method.
IOException
- when unable to start listening. Specific exceptions are dependent on the Connector implementation in use.IllegalConnectorArgumentsException
- when one of the connector arguments is invalid.void stopListening(Map<String,? extends Connector.Argument> arguments) throws IOException, IllegalConnectorArgumentsException
startListening(java.util.Map<java.lang.String, ? extends com.sun.jdi.connect.Connector.Argument>)
invocation.IOException
- when unable to stop listening. Specific exceptions are dependent on the Connector implementation in use.IllegalConnectorArgumentsException
- when one of the connector arguments is invalid.VirtualMachine accept(Map<String,? extends Connector.Argument> arguments) throws IOException, IllegalConnectorArgumentsException
TransportTimeoutException
- when the Connector encapsulates a transport that supports a timeout when accepting, a Connector.Argument
representing a timeout has been set in the argument map, and a timeout occurs whilst waiting for the target VM to connect.IOException
- when unable to accept. Specific exceptions are dependent on the Connector implementation in use.IllegalConnectorArgumentsException
- when one of the connector arguments is invalid.
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/jdk.jdi/com/sun/jdi/connect/ListeningConnector.html