Java Code Examples for com.sun.tools.attach.spi.AttachProvider#providers()

The following examples show how to use com.sun.tools.attach.spi.AttachProvider#providers() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: VirtualMachine.java    From jdk8u-dev-jdk with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Attaches to a Java virtual machine.
 *
 * <p> This method obtains the list of attach providers by invoking the
 * {@link com.sun.tools.attach.spi.AttachProvider#providers()
 * AttachProvider.providers()} method. It then iterates overs the list
 * and invokes each provider's {@link
 * com.sun.tools.attach.spi.AttachProvider#attachVirtualMachine(java.lang.String)
 * attachVirtualMachine} method in turn. If a provider successfully
 * attaches then the iteration terminates, and the VirtualMachine created
 * by the provider that successfully attached is returned by this method.
 * If the <code>attachVirtualMachine</code> method of all providers throws
 * {@link com.sun.tools.attach.AttachNotSupportedException AttachNotSupportedException}
 * then this method also throws <code>AttachNotSupportedException</code>.
 * This means that <code>AttachNotSupportedException</code> is thrown when
 * the identifier provided to this method is invalid, or the identifier
 * corresponds to a Java virtual machine that does not exist, or none
 * of the providers can attach to it. This exception is also thrown if
 * {@link com.sun.tools.attach.spi.AttachProvider#providers()
 * AttachProvider.providers()} returns an empty list. </p>
 *
 * @param   id
 *          The abstract identifier that identifies the Java virtual machine.
 *
 * @return  A VirtualMachine representing the target VM.
 *
 * @throws  SecurityException
 *          If a security manager has been installed and it denies
 *          {@link com.sun.tools.attach.AttachPermission AttachPermission}
 *          <tt>("attachVirtualMachine")</tt>, or another permission
 *          required by the implementation.
 *
 * @throws  AttachNotSupportedException
 *          If the <code>attachVirtualmachine</code> method of all installed
 *          providers throws <code>AttachNotSupportedException</code>, or
 *          there aren't any providers installed.
 *
 * @throws  IOException
 *          If an I/O error occurs
 *
 * @throws  NullPointerException
 *          If <code>id</code> is <code>null</code>.
 */
public static VirtualMachine attach(String id)
    throws AttachNotSupportedException, IOException
{
    if (id == null) {
        throw new NullPointerException("id cannot be null");
    }
    List<AttachProvider> providers = AttachProvider.providers();
    if (providers.size() == 0) {
        throw new AttachNotSupportedException("no providers installed");
    }
    AttachNotSupportedException lastExc = null;
    for (AttachProvider provider: providers) {
        try {
            return provider.attachVirtualMachine(id);
        } catch (AttachNotSupportedException x) {
            lastExc = x;
        }
    }
    throw lastExc;
}
 
Example 2
Source File: VirtualMachine.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Attaches to a Java virtual machine.
 *
 * <p> This method obtains the list of attach providers by invoking the
 * {@link com.sun.tools.attach.spi.AttachProvider#providers()
 * AttachProvider.providers()} method. It then iterates overs the list
 * and invokes each provider's {@link
 * com.sun.tools.attach.spi.AttachProvider#attachVirtualMachine(java.lang.String)
 * attachVirtualMachine} method in turn. If a provider successfully
 * attaches then the iteration terminates, and the VirtualMachine created
 * by the provider that successfully attached is returned by this method.
 * If the <code>attachVirtualMachine</code> method of all providers throws
 * {@link com.sun.tools.attach.AttachNotSupportedException AttachNotSupportedException}
 * then this method also throws <code>AttachNotSupportedException</code>.
 * This means that <code>AttachNotSupportedException</code> is thrown when
 * the identifier provided to this method is invalid, or the identifier
 * corresponds to a Java virtual machine that does not exist, or none
 * of the providers can attach to it. This exception is also thrown if
 * {@link com.sun.tools.attach.spi.AttachProvider#providers()
 * AttachProvider.providers()} returns an empty list. </p>
 *
 * @param   id
 *          The abstract identifier that identifies the Java virtual machine.
 *
 * @return  A VirtualMachine representing the target VM.
 *
 * @throws  SecurityException
 *          If a security manager has been installed and it denies
 *          {@link com.sun.tools.attach.AttachPermission AttachPermission}
 *          <tt>("attachVirtualMachine")</tt>, or another permission
 *          required by the implementation.
 *
 * @throws  AttachNotSupportedException
 *          If the <code>attachVirtualmachine</code> method of all installed
 *          providers throws <code>AttachNotSupportedException</code>, or
 *          there aren't any providers installed.
 *
 * @throws  IOException
 *          If an I/O error occurs
 *
 * @throws  NullPointerException
 *          If <code>id</code> is <code>null</code>.
 */
public static VirtualMachine attach(String id)
    throws AttachNotSupportedException, IOException
{
    if (id == null) {
        throw new NullPointerException("id cannot be null");
    }
    List<AttachProvider> providers = AttachProvider.providers();
    if (providers.size() == 0) {
        throw new AttachNotSupportedException("no providers installed");
    }
    AttachNotSupportedException lastExc = null;
    for (AttachProvider provider: providers) {
        try {
            return provider.attachVirtualMachine(id);
        } catch (AttachNotSupportedException x) {
            lastExc = x;
        }
    }
    throw lastExc;
}
 
Example 3
Source File: VirtualMachine.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Attaches to a Java virtual machine.
 *
 * <p> This method obtains the list of attach providers by invoking the
 * {@link com.sun.tools.attach.spi.AttachProvider#providers()
 * AttachProvider.providers()} method. It then iterates overs the list
 * and invokes each provider's {@link
 * com.sun.tools.attach.spi.AttachProvider#attachVirtualMachine(java.lang.String)
 * attachVirtualMachine} method in turn. If a provider successfully
 * attaches then the iteration terminates, and the VirtualMachine created
 * by the provider that successfully attached is returned by this method.
 * If the <code>attachVirtualMachine</code> method of all providers throws
 * {@link com.sun.tools.attach.AttachNotSupportedException AttachNotSupportedException}
 * then this method also throws <code>AttachNotSupportedException</code>.
 * This means that <code>AttachNotSupportedException</code> is thrown when
 * the identifier provided to this method is invalid, or the identifier
 * corresponds to a Java virtual machine that does not exist, or none
 * of the providers can attach to it. This exception is also thrown if
 * {@link com.sun.tools.attach.spi.AttachProvider#providers()
 * AttachProvider.providers()} returns an empty list. </p>
 *
 * @param   id
 *          The abstract identifier that identifies the Java virtual machine.
 *
 * @return  A VirtualMachine representing the target VM.
 *
 * @throws  SecurityException
 *          If a security manager has been installed and it denies
 *          {@link com.sun.tools.attach.AttachPermission AttachPermission}
 *          <tt>("attachVirtualMachine")</tt>, or another permission
 *          required by the implementation.
 *
 * @throws  AttachNotSupportedException
 *          If the <code>attachVirtualmachine</code> method of all installed
 *          providers throws <code>AttachNotSupportedException</code>, or
 *          there aren't any providers installed.
 *
 * @throws  IOException
 *          If an I/O error occurs
 *
 * @throws  NullPointerException
 *          If <code>id</code> is <code>null</code>.
 */
public static VirtualMachine attach(String id)
    throws AttachNotSupportedException, IOException
{
    if (id == null) {
        throw new NullPointerException("id cannot be null");
    }
    List<AttachProvider> providers = AttachProvider.providers();
    if (providers.size() == 0) {
        throw new AttachNotSupportedException("no providers installed");
    }
    AttachNotSupportedException lastExc = null;
    for (AttachProvider provider: providers) {
        try {
            return provider.attachVirtualMachine(id);
        } catch (AttachNotSupportedException x) {
            lastExc = x;
        }
    }
    throw lastExc;
}
 
Example 4
Source File: VirtualMachine.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Attaches to a Java virtual machine.
 *
 * <p> This method obtains the list of attach providers by invoking the
 * {@link com.sun.tools.attach.spi.AttachProvider#providers()
 * AttachProvider.providers()} method. It then iterates overs the list
 * and invokes each provider's {@link
 * com.sun.tools.attach.spi.AttachProvider#attachVirtualMachine(java.lang.String)
 * attachVirtualMachine} method in turn. If a provider successfully
 * attaches then the iteration terminates, and the VirtualMachine created
 * by the provider that successfully attached is returned by this method.
 * If the <code>attachVirtualMachine</code> method of all providers throws
 * {@link com.sun.tools.attach.AttachNotSupportedException AttachNotSupportedException}
 * then this method also throws <code>AttachNotSupportedException</code>.
 * This means that <code>AttachNotSupportedException</code> is thrown when
 * the identifier provided to this method is invalid, or the identifier
 * corresponds to a Java virtual machine that does not exist, or none
 * of the providers can attach to it. This exception is also thrown if
 * {@link com.sun.tools.attach.spi.AttachProvider#providers()
 * AttachProvider.providers()} returns an empty list. </p>
 *
 * @param   id
 *          The abstract identifier that identifies the Java virtual machine.
 *
 * @return  A VirtualMachine representing the target VM.
 *
 * @throws  SecurityException
 *          If a security manager has been installed and it denies
 *          {@link com.sun.tools.attach.AttachPermission AttachPermission}
 *          <tt>("attachVirtualMachine")</tt>, or another permission
 *          required by the implementation.
 *
 * @throws  AttachNotSupportedException
 *          If the <code>attachVirtualmachine</code> method of all installed
 *          providers throws <code>AttachNotSupportedException</code>, or
 *          there aren't any providers installed.
 *
 * @throws  IOException
 *          If an I/O error occurs
 *
 * @throws  NullPointerException
 *          If <code>id</code> is <code>null</code>.
 */
public static VirtualMachine attach(String id)
    throws AttachNotSupportedException, IOException
{
    if (id == null) {
        throw new NullPointerException("id cannot be null");
    }
    List<AttachProvider> providers = AttachProvider.providers();
    if (providers.size() == 0) {
        throw new AttachNotSupportedException("no providers installed");
    }
    AttachNotSupportedException lastExc = null;
    for (AttachProvider provider: providers) {
        try {
            return provider.attachVirtualMachine(id);
        } catch (AttachNotSupportedException x) {
            lastExc = x;
        }
    }
    throw lastExc;
}
 
Example 5
Source File: VirtualMachine.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Attaches to a Java virtual machine.
 *
 * <p> This method obtains the list of attach providers by invoking the
 * {@link com.sun.tools.attach.spi.AttachProvider#providers()
 * AttachProvider.providers()} method. It then iterates overs the list
 * and invokes each provider's {@link
 * com.sun.tools.attach.spi.AttachProvider#attachVirtualMachine(java.lang.String)
 * attachVirtualMachine} method in turn. If a provider successfully
 * attaches then the iteration terminates, and the VirtualMachine created
 * by the provider that successfully attached is returned by this method.
 * If the <code>attachVirtualMachine</code> method of all providers throws
 * {@link com.sun.tools.attach.AttachNotSupportedException AttachNotSupportedException}
 * then this method also throws <code>AttachNotSupportedException</code>.
 * This means that <code>AttachNotSupportedException</code> is thrown when
 * the identifier provided to this method is invalid, or the identifier
 * corresponds to a Java virtual machine that does not exist, or none
 * of the providers can attach to it. This exception is also thrown if
 * {@link com.sun.tools.attach.spi.AttachProvider#providers()
 * AttachProvider.providers()} returns an empty list. </p>
 *
 * @param   id
 *          The abstract identifier that identifies the Java virtual machine.
 *
 * @return  A VirtualMachine representing the target VM.
 *
 * @throws  SecurityException
 *          If a security manager has been installed and it denies
 *          {@link com.sun.tools.attach.AttachPermission AttachPermission}
 *          <tt>("attachVirtualMachine")</tt>, or another permission
 *          required by the implementation.
 *
 * @throws  AttachNotSupportedException
 *          If the <code>attachVirtualmachine</code> method of all installed
 *          providers throws <code>AttachNotSupportedException</code>, or
 *          there aren't any providers installed.
 *
 * @throws  IOException
 *          If an I/O error occurs
 *
 * @throws  NullPointerException
 *          If <code>id</code> is <code>null</code>.
 */
public static VirtualMachine attach(String id)
    throws AttachNotSupportedException, IOException
{
    if (id == null) {
        throw new NullPointerException("id cannot be null");
    }
    List<AttachProvider> providers = AttachProvider.providers();
    if (providers.size() == 0) {
        throw new AttachNotSupportedException("no providers installed");
    }
    AttachNotSupportedException lastExc = null;
    for (AttachProvider provider: providers) {
        try {
            return provider.attachVirtualMachine(id);
        } catch (AttachNotSupportedException x) {
            lastExc = x;
        }
    }
    throw lastExc;
}
 
Example 6
Source File: VirtualMachine.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Attaches to a Java virtual machine.
 *
 * <p> This method obtains the list of attach providers by invoking the
 * {@link com.sun.tools.attach.spi.AttachProvider#providers()
 * AttachProvider.providers()} method. It then iterates overs the list
 * and invokes each provider's {@link
 * com.sun.tools.attach.spi.AttachProvider#attachVirtualMachine(java.lang.String)
 * attachVirtualMachine} method in turn. If a provider successfully
 * attaches then the iteration terminates, and the VirtualMachine created
 * by the provider that successfully attached is returned by this method.
 * If the <code>attachVirtualMachine</code> method of all providers throws
 * {@link com.sun.tools.attach.AttachNotSupportedException AttachNotSupportedException}
 * then this method also throws <code>AttachNotSupportedException</code>.
 * This means that <code>AttachNotSupportedException</code> is thrown when
 * the identifier provided to this method is invalid, or the identifier
 * corresponds to a Java virtual machine that does not exist, or none
 * of the providers can attach to it. This exception is also thrown if
 * {@link com.sun.tools.attach.spi.AttachProvider#providers()
 * AttachProvider.providers()} returns an empty list. </p>
 *
 * @param   id
 *          The abstract identifier that identifies the Java virtual machine.
 *
 * @return  A VirtualMachine representing the target VM.
 *
 * @throws  SecurityException
 *          If a security manager has been installed and it denies
 *          {@link com.sun.tools.attach.AttachPermission AttachPermission}
 *          <tt>("attachVirtualMachine")</tt>, or another permission
 *          required by the implementation.
 *
 * @throws  AttachNotSupportedException
 *          If the <code>attachVirtualmachine</code> method of all installed
 *          providers throws <code>AttachNotSupportedException</code>, or
 *          there aren't any providers installed.
 *
 * @throws  IOException
 *          If an I/O error occurs
 *
 * @throws  NullPointerException
 *          If <code>id</code> is <code>null</code>.
 */
public static VirtualMachine attach(String id)
    throws AttachNotSupportedException, IOException
{
    if (id == null) {
        throw new NullPointerException("id cannot be null");
    }
    List<AttachProvider> providers = AttachProvider.providers();
    if (providers.size() == 0) {
        throw new AttachNotSupportedException("no providers installed");
    }
    AttachNotSupportedException lastExc = null;
    for (AttachProvider provider: providers) {
        try {
            return provider.attachVirtualMachine(id);
        } catch (AttachNotSupportedException x) {
            lastExc = x;
        }
    }
    throw lastExc;
}
 
Example 7
Source File: VirtualMachine.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Attaches to a Java virtual machine.
 *
 * <p> This method obtains the list of attach providers by invoking the
 * {@link com.sun.tools.attach.spi.AttachProvider#providers()
 * AttachProvider.providers()} method. It then iterates overs the list
 * and invokes each provider's {@link
 * com.sun.tools.attach.spi.AttachProvider#attachVirtualMachine(java.lang.String)
 * attachVirtualMachine} method in turn. If a provider successfully
 * attaches then the iteration terminates, and the VirtualMachine created
 * by the provider that successfully attached is returned by this method.
 * If the <code>attachVirtualMachine</code> method of all providers throws
 * {@link com.sun.tools.attach.AttachNotSupportedException AttachNotSupportedException}
 * then this method also throws <code>AttachNotSupportedException</code>.
 * This means that <code>AttachNotSupportedException</code> is thrown when
 * the identifier provided to this method is invalid, or the identifier
 * corresponds to a Java virtual machine that does not exist, or none
 * of the providers can attach to it. This exception is also thrown if
 * {@link com.sun.tools.attach.spi.AttachProvider#providers()
 * AttachProvider.providers()} returns an empty list. </p>
 *
 * @param   id
 *          The abstract identifier that identifies the Java virtual machine.
 *
 * @return  A VirtualMachine representing the target VM.
 *
 * @throws  SecurityException
 *          If a security manager has been installed and it denies
 *          {@link com.sun.tools.attach.AttachPermission AttachPermission}
 *          <tt>("attachVirtualMachine")</tt>, or another permission
 *          required by the implementation.
 *
 * @throws  AttachNotSupportedException
 *          If the <code>attachVirtualmachine</code> method of all installed
 *          providers throws <code>AttachNotSupportedException</code>, or
 *          there aren't any providers installed.
 *
 * @throws  IOException
 *          If an I/O error occurs
 *
 * @throws  NullPointerException
 *          If <code>id</code> is <code>null</code>.
 */
public static VirtualMachine attach(String id)
    throws AttachNotSupportedException, IOException
{
    if (id == null) {
        throw new NullPointerException("id cannot be null");
    }
    List<AttachProvider> providers = AttachProvider.providers();
    if (providers.size() == 0) {
        throw new AttachNotSupportedException("no providers installed");
    }
    AttachNotSupportedException lastExc = null;
    for (AttachProvider provider: providers) {
        try {
            return provider.attachVirtualMachine(id);
        } catch (AttachNotSupportedException x) {
            lastExc = x;
        }
    }
    throw lastExc;
}
 
Example 8
Source File: VirtualMachine.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Attaches to a Java virtual machine.
 *
 * <p> This method obtains the list of attach providers by invoking the
 * {@link com.sun.tools.attach.spi.AttachProvider#providers()
 * AttachProvider.providers()} method. It then iterates overs the list
 * and invokes each provider's {@link
 * com.sun.tools.attach.spi.AttachProvider#attachVirtualMachine(java.lang.String)
 * attachVirtualMachine} method in turn. If a provider successfully
 * attaches then the iteration terminates, and the VirtualMachine created
 * by the provider that successfully attached is returned by this method.
 * If the {@code attachVirtualMachine} method of all providers throws
 * {@link com.sun.tools.attach.AttachNotSupportedException AttachNotSupportedException}
 * then this method also throws {@code AttachNotSupportedException}.
 * This means that {@code AttachNotSupportedException} is thrown when
 * the identifier provided to this method is invalid, or the identifier
 * corresponds to a Java virtual machine that does not exist, or none
 * of the providers can attach to it. This exception is also thrown if
 * {@link com.sun.tools.attach.spi.AttachProvider#providers()
 * AttachProvider.providers()} returns an empty list. </p>
 *
 * @param   id
 *          The abstract identifier that identifies the Java virtual machine.
 *
 * @return  A VirtualMachine representing the target VM.
 *
 * @throws  SecurityException
 *          If a security manager has been installed and it denies
 *          {@link com.sun.tools.attach.AttachPermission AttachPermission}
 *          {@code ("attachVirtualMachine")}, or another permission
 *          required by the implementation.
 *
 * @throws  AttachNotSupportedException
 *          If the {@code attachVirtualmachine} method of all installed
 *          providers throws {@code AttachNotSupportedException}, or
 *          there aren't any providers installed.
 *
 * @throws  IOException
 *          If an I/O error occurs
 *
 * @throws  NullPointerException
 *          If {@code id} is {@code null}.
 */
public static VirtualMachine attach(String id)
    throws AttachNotSupportedException, IOException
{
    if (id == null) {
        throw new NullPointerException("id cannot be null");
    }
    List<AttachProvider> providers = AttachProvider.providers();
    if (providers.size() == 0) {
        throw new AttachNotSupportedException("no providers installed");
    }
    AttachNotSupportedException lastExc = null;
    for (AttachProvider provider: providers) {
        try {
            return provider.attachVirtualMachine(id);
        } catch (AttachNotSupportedException x) {
            lastExc = x;
        }
    }
    throw lastExc;
}
 
Example 9
Source File: VirtualMachine.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Attaches to a Java virtual machine.
 *
 * <p> This method obtains the list of attach providers by invoking the
 * {@link com.sun.tools.attach.spi.AttachProvider#providers()
 * AttachProvider.providers()} method. It then iterates overs the list
 * and invokes each provider's {@link
 * com.sun.tools.attach.spi.AttachProvider#attachVirtualMachine(java.lang.String)
 * attachVirtualMachine} method in turn. If a provider successfully
 * attaches then the iteration terminates, and the VirtualMachine created
 * by the provider that successfully attached is returned by this method.
 * If the <code>attachVirtualMachine</code> method of all providers throws
 * {@link com.sun.tools.attach.AttachNotSupportedException AttachNotSupportedException}
 * then this method also throws <code>AttachNotSupportedException</code>.
 * This means that <code>AttachNotSupportedException</code> is thrown when
 * the identifier provided to this method is invalid, or the identifier
 * corresponds to a Java virtual machine that does not exist, or none
 * of the providers can attach to it. This exception is also thrown if
 * {@link com.sun.tools.attach.spi.AttachProvider#providers()
 * AttachProvider.providers()} returns an empty list. </p>
 *
 * @param   id
 *          The abstract identifier that identifies the Java virtual machine.
 *
 * @return  A VirtualMachine representing the target VM.
 *
 * @throws  SecurityException
 *          If a security manager has been installed and it denies
 *          {@link com.sun.tools.attach.AttachPermission AttachPermission}
 *          <tt>("attachVirtualMachine")</tt>, or another permission
 *          required by the implementation.
 *
 * @throws  AttachNotSupportedException
 *          If the <code>attachVirtualmachine</code> method of all installed
 *          providers throws <code>AttachNotSupportedException</code>, or
 *          there aren't any providers installed.
 *
 * @throws  IOException
 *          If an I/O error occurs
 *
 * @throws  NullPointerException
 *          If <code>id</code> is <code>null</code>.
 */
public static VirtualMachine attach(String id)
    throws AttachNotSupportedException, IOException
{
    if (id == null) {
        throw new NullPointerException("id cannot be null");
    }
    List<AttachProvider> providers = AttachProvider.providers();
    if (providers.size() == 0) {
        throw new AttachNotSupportedException("no providers installed");
    }
    AttachNotSupportedException lastExc = null;
    for (AttachProvider provider: providers) {
        try {
            return provider.attachVirtualMachine(id);
        } catch (AttachNotSupportedException x) {
            lastExc = x;
        }
    }
    throw lastExc;
}
 
Example 10
Source File: VirtualMachine.java    From openjdk-jdk9 with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Return a list of Java virtual machines.
 *
 * <p> This method returns a list of Java {@link
 * com.sun.tools.attach.VirtualMachineDescriptor} elements.
 * The list is an aggregation of the virtual machine
 * descriptor lists obtained by invoking the {@link
 * com.sun.tools.attach.spi.AttachProvider#listVirtualMachines
 * listVirtualMachines} method of all installed
 * {@link com.sun.tools.attach.spi.AttachProvider attach providers}.
 * If there are no Java virtual machines known to any provider
 * then an empty list is returned.
 *
 * @return  The list of virtual machine descriptors.
 */
public static List<VirtualMachineDescriptor> list() {
    ArrayList<VirtualMachineDescriptor> l =
        new ArrayList<VirtualMachineDescriptor>();
    List<AttachProvider> providers = AttachProvider.providers();
    for (AttachProvider provider: providers) {
        l.addAll(provider.listVirtualMachines());
    }
    return l;
}
 
Example 11
Source File: VirtualMachine.java    From jdk8u_jdk with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Return a list of Java virtual machines.
 *
 * <p> This method returns a list of Java {@link
 * com.sun.tools.attach.VirtualMachineDescriptor} elements.
 * The list is an aggregation of the virtual machine
 * descriptor lists obtained by invoking the {@link
 * com.sun.tools.attach.spi.AttachProvider#listVirtualMachines
 * listVirtualMachines} method of all installed
 * {@link com.sun.tools.attach.spi.AttachProvider attach providers}.
 * If there are no Java virtual machines known to any provider
 * then an empty list is returned.
 *
 * @return  The list of virtual machine descriptors.
 */
public static List<VirtualMachineDescriptor> list() {
    ArrayList<VirtualMachineDescriptor> l =
        new ArrayList<VirtualMachineDescriptor>();
    List<AttachProvider> providers = AttachProvider.providers();
    for (AttachProvider provider: providers) {
        l.addAll(provider.listVirtualMachines());
    }
    return l;
}
 
Example 12
Source File: VirtualMachine.java    From openjdk-8-source with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Return a list of Java virtual machines.
 *
 * <p> This method returns a list of Java {@link
 * com.sun.tools.attach.VirtualMachineDescriptor} elements.
 * The list is an aggregation of the virtual machine
 * descriptor lists obtained by invoking the {@link
 * com.sun.tools.attach.spi.AttachProvider#listVirtualMachines
 * listVirtualMachines} method of all installed
 * {@link com.sun.tools.attach.spi.AttachProvider attach providers}.
 * If there are no Java virtual machines known to any provider
 * then an empty list is returned.
 *
 * @return  The list of virtual machine descriptors.
 */
public static List<VirtualMachineDescriptor> list() {
    ArrayList<VirtualMachineDescriptor> l =
        new ArrayList<VirtualMachineDescriptor>();
    List<AttachProvider> providers = AttachProvider.providers();
    for (AttachProvider provider: providers) {
        l.addAll(provider.listVirtualMachines());
    }
    return l;
}
 
Example 13
Source File: VirtualMachine.java    From hottub with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Return a list of Java virtual machines.
 *
 * <p> This method returns a list of Java {@link
 * com.sun.tools.attach.VirtualMachineDescriptor} elements.
 * The list is an aggregation of the virtual machine
 * descriptor lists obtained by invoking the {@link
 * com.sun.tools.attach.spi.AttachProvider#listVirtualMachines
 * listVirtualMachines} method of all installed
 * {@link com.sun.tools.attach.spi.AttachProvider attach providers}.
 * If there are no Java virtual machines known to any provider
 * then an empty list is returned.
 *
 * @return  The list of virtual machine descriptors.
 */
public static List<VirtualMachineDescriptor> list() {
    ArrayList<VirtualMachineDescriptor> l =
        new ArrayList<VirtualMachineDescriptor>();
    List<AttachProvider> providers = AttachProvider.providers();
    for (AttachProvider provider: providers) {
        l.addAll(provider.listVirtualMachines());
    }
    return l;
}
 
Example 14
Source File: VirtualMachine.java    From jdk8u-jdk with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Return a list of Java virtual machines.
 *
 * <p> This method returns a list of Java {@link
 * com.sun.tools.attach.VirtualMachineDescriptor} elements.
 * The list is an aggregation of the virtual machine
 * descriptor lists obtained by invoking the {@link
 * com.sun.tools.attach.spi.AttachProvider#listVirtualMachines
 * listVirtualMachines} method of all installed
 * {@link com.sun.tools.attach.spi.AttachProvider attach providers}.
 * If there are no Java virtual machines known to any provider
 * then an empty list is returned.
 *
 * @return  The list of virtual machine descriptors.
 */
public static List<VirtualMachineDescriptor> list() {
    ArrayList<VirtualMachineDescriptor> l =
        new ArrayList<VirtualMachineDescriptor>();
    List<AttachProvider> providers = AttachProvider.providers();
    for (AttachProvider provider: providers) {
        l.addAll(provider.listVirtualMachines());
    }
    return l;
}
 
Example 15
Source File: VirtualMachine.java    From dragonwell8_jdk with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Return a list of Java virtual machines.
 *
 * <p> This method returns a list of Java {@link
 * com.sun.tools.attach.VirtualMachineDescriptor} elements.
 * The list is an aggregation of the virtual machine
 * descriptor lists obtained by invoking the {@link
 * com.sun.tools.attach.spi.AttachProvider#listVirtualMachines
 * listVirtualMachines} method of all installed
 * {@link com.sun.tools.attach.spi.AttachProvider attach providers}.
 * If there are no Java virtual machines known to any provider
 * then an empty list is returned.
 *
 * @return  The list of virtual machine descriptors.
 */
public static List<VirtualMachineDescriptor> list() {
    ArrayList<VirtualMachineDescriptor> l =
        new ArrayList<VirtualMachineDescriptor>();
    List<AttachProvider> providers = AttachProvider.providers();
    for (AttachProvider provider: providers) {
        l.addAll(provider.listVirtualMachines());
    }
    return l;
}
 
Example 16
Source File: VirtualMachine.java    From jdk8u-jdk with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Return a list of Java virtual machines.
 *
 * <p> This method returns a list of Java {@link
 * com.sun.tools.attach.VirtualMachineDescriptor} elements.
 * The list is an aggregation of the virtual machine
 * descriptor lists obtained by invoking the {@link
 * com.sun.tools.attach.spi.AttachProvider#listVirtualMachines
 * listVirtualMachines} method of all installed
 * {@link com.sun.tools.attach.spi.AttachProvider attach providers}.
 * If there are no Java virtual machines known to any provider
 * then an empty list is returned.
 *
 * @return  The list of virtual machine descriptors.
 */
public static List<VirtualMachineDescriptor> list() {
    ArrayList<VirtualMachineDescriptor> l =
        new ArrayList<VirtualMachineDescriptor>();
    List<AttachProvider> providers = AttachProvider.providers();
    for (AttachProvider provider: providers) {
        l.addAll(provider.listVirtualMachines());
    }
    return l;
}
 
Example 17
Source File: VirtualMachine.java    From openjdk-jdk8u with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Return a list of Java virtual machines.
 *
 * <p> This method returns a list of Java {@link
 * com.sun.tools.attach.VirtualMachineDescriptor} elements.
 * The list is an aggregation of the virtual machine
 * descriptor lists obtained by invoking the {@link
 * com.sun.tools.attach.spi.AttachProvider#listVirtualMachines
 * listVirtualMachines} method of all installed
 * {@link com.sun.tools.attach.spi.AttachProvider attach providers}.
 * If there are no Java virtual machines known to any provider
 * then an empty list is returned.
 *
 * @return  The list of virtual machine descriptors.
 */
public static List<VirtualMachineDescriptor> list() {
    ArrayList<VirtualMachineDescriptor> l =
        new ArrayList<VirtualMachineDescriptor>();
    List<AttachProvider> providers = AttachProvider.providers();
    for (AttachProvider provider: providers) {
        l.addAll(provider.listVirtualMachines());
    }
    return l;
}
 
Example 18
Source File: VirtualMachine.java    From jdk8u60 with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Return a list of Java virtual machines.
 *
 * <p> This method returns a list of Java {@link
 * com.sun.tools.attach.VirtualMachineDescriptor} elements.
 * The list is an aggregation of the virtual machine
 * descriptor lists obtained by invoking the {@link
 * com.sun.tools.attach.spi.AttachProvider#listVirtualMachines
 * listVirtualMachines} method of all installed
 * {@link com.sun.tools.attach.spi.AttachProvider attach providers}.
 * If there are no Java virtual machines known to any provider
 * then an empty list is returned.
 *
 * @return  The list of virtual machine descriptors.
 */
public static List<VirtualMachineDescriptor> list() {
    ArrayList<VirtualMachineDescriptor> l =
        new ArrayList<VirtualMachineDescriptor>();
    List<AttachProvider> providers = AttachProvider.providers();
    for (AttachProvider provider: providers) {
        l.addAll(provider.listVirtualMachines());
    }
    return l;
}
 
Example 19
Source File: VirtualMachine.java    From TencentKona-8 with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Return a list of Java virtual machines.
 *
 * <p> This method returns a list of Java {@link
 * com.sun.tools.attach.VirtualMachineDescriptor} elements.
 * The list is an aggregation of the virtual machine
 * descriptor lists obtained by invoking the {@link
 * com.sun.tools.attach.spi.AttachProvider#listVirtualMachines
 * listVirtualMachines} method of all installed
 * {@link com.sun.tools.attach.spi.AttachProvider attach providers}.
 * If there are no Java virtual machines known to any provider
 * then an empty list is returned.
 *
 * @return  The list of virtual machine descriptors.
 */
public static List<VirtualMachineDescriptor> list() {
    ArrayList<VirtualMachineDescriptor> l =
        new ArrayList<VirtualMachineDescriptor>();
    List<AttachProvider> providers = AttachProvider.providers();
    for (AttachProvider provider: providers) {
        l.addAll(provider.listVirtualMachines());
    }
    return l;
}
 
Example 20
Source File: VirtualMachine.java    From jdk8u-dev-jdk with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Return a list of Java virtual machines.
 *
 * <p> This method returns a list of Java {@link
 * com.sun.tools.attach.VirtualMachineDescriptor} elements.
 * The list is an aggregation of the virtual machine
 * descriptor lists obtained by invoking the {@link
 * com.sun.tools.attach.spi.AttachProvider#listVirtualMachines
 * listVirtualMachines} method of all installed
 * {@link com.sun.tools.attach.spi.AttachProvider attach providers}.
 * If there are no Java virtual machines known to any provider
 * then an empty list is returned.
 *
 * @return  The list of virtual machine descriptors.
 */
public static List<VirtualMachineDescriptor> list() {
    ArrayList<VirtualMachineDescriptor> l =
        new ArrayList<VirtualMachineDescriptor>();
    List<AttachProvider> providers = AttachProvider.providers();
    for (AttachProvider provider: providers) {
        l.addAll(provider.listVirtualMachines());
    }
    return l;
}