Search in sources :

Example 1 with Connector

use of com.sun.jdi.connect.Connector in project jdk8u_jdk by JetBrains.

the class BadHandshakeTest method findConnector.

/*
     * Find a connector by name
     */
private static Connector findConnector(String name) {
    List connectors = Bootstrap.virtualMachineManager().allConnectors();
    Iterator iter = connectors.iterator();
    while (iter.hasNext()) {
        Connector connector = (Connector) iter.next();
        if (connector.name().equals(name)) {
            return connector;
        }
    }
    return null;
}
Also used : AttachingConnector(com.sun.jdi.connect.AttachingConnector) Connector(com.sun.jdi.connect.Connector) Iterator(java.util.Iterator) List(java.util.List)

Example 2 with Connector

use of com.sun.jdi.connect.Connector in project jdk8u_jdk by JetBrains.

the class ExclusiveBind method findConnector.

/*
     * Find a connector by name
     */
private static Connector findConnector(String name) {
    List connectors = Bootstrap.virtualMachineManager().allConnectors();
    Iterator iter = connectors.iterator();
    while (iter.hasNext()) {
        Connector connector = (Connector) iter.next();
        if (connector.name().equals(name)) {
            return connector;
        }
    }
    return null;
}
Also used : AttachingConnector(com.sun.jdi.connect.AttachingConnector) Connector(com.sun.jdi.connect.Connector) Iterator(java.util.Iterator) List(java.util.List) ArrayList(java.util.ArrayList)

Example 3 with Connector

use of com.sun.jdi.connect.Connector in project jdk8u_jdk by JetBrains.

the class RunToExit method findConnector.

/*
     * Find a connector by name
     */
private static Connector findConnector(String name) {
    List connectors = Bootstrap.virtualMachineManager().allConnectors();
    Iterator iter = connectors.iterator();
    while (iter.hasNext()) {
        Connector connector = (Connector) iter.next();
        if (connector.name().equals(name)) {
            return connector;
        }
    }
    return null;
}
Also used : AttachingConnector(com.sun.jdi.connect.AttachingConnector) Connector(com.sun.jdi.connect.Connector) Iterator(java.util.Iterator) List(java.util.List)

Example 4 with Connector

use of com.sun.jdi.connect.Connector in project jdk8u_jdk by JetBrains.

the class Commands method commandConnectors.

void commandConnectors(VirtualMachineManager vmm) {
    Collection<Connector> ccs = vmm.allConnectors();
    if (ccs.isEmpty()) {
        MessageOutput.println("Connectors available");
    }
    for (Connector cc : ccs) {
        String transportName = cc.transport() == null ? "null" : cc.transport().name();
        MessageOutput.println();
        MessageOutput.println("Connector and Transport name", new Object[] { cc.name(), transportName });
        MessageOutput.println("Connector description", cc.description());
        for (Connector.Argument aa : cc.defaultArguments().values()) {
            MessageOutput.println();
            boolean requiredArgument = aa.mustSpecify();
            if (aa.value() == null || aa.value() == "") {
                //no current value and no default.
                MessageOutput.println(requiredArgument ? "Connector required argument nodefault" : "Connector argument nodefault", aa.name());
            } else {
                MessageOutput.println(requiredArgument ? "Connector required argument default" : "Connector argument default", new Object[] { aa.name(), aa.value() });
            }
            MessageOutput.println("Connector description", aa.description());
        }
    }
}
Also used : Connector(com.sun.jdi.connect.Connector)

Example 5 with Connector

use of com.sun.jdi.connect.Connector in project HotswapAgent by HotswapProjects.

the class HotSwapperJpda method findConnector.

private Connector findConnector(String connector) throws IOException {
    List connectors = Bootstrap.virtualMachineManager().allConnectors();
    Iterator iter = connectors.iterator();
    while (iter.hasNext()) {
        Connector con = (Connector) iter.next();
        if (con.name().equals(connector)) {
            return con;
        }
    }
    throw new IOException("Not found: " + connector);
}
Also used : AttachingConnector(com.sun.jdi.connect.AttachingConnector) Connector(com.sun.jdi.connect.Connector) IOException(java.io.IOException)

Aggregations

Connector (com.sun.jdi.connect.Connector)6 AttachingConnector (com.sun.jdi.connect.AttachingConnector)4 Iterator (java.util.Iterator)3 List (java.util.List)3 ListeningConnector (com.sun.jdi.connect.ListeningConnector)1 TransportTimeoutException (com.sun.jdi.connect.TransportTimeoutException)1 IOException (java.io.IOException)1 ArrayList (java.util.ArrayList)1