Java Code Examples for com.sun.tools.attach.VirtualMachineDescriptor#provider()
The following examples show how to use
com.sun.tools.attach.VirtualMachineDescriptor#provider() .
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: SolarisAttachProvider.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
public VirtualMachine attachVirtualMachine(VirtualMachineDescriptor vmd) throws AttachNotSupportedException, IOException { if (vmd.provider() != this) { throw new AttachNotSupportedException("provider mismatch"); } // To avoid re-checking if the VM if attachable, we check if the descriptor // is for a hotspot VM - these descriptors are created by the listVirtualMachines // implementation which only returns a list of attachable VMs. if (vmd instanceof HotSpotVirtualMachineDescriptor) { assert ((HotSpotVirtualMachineDescriptor)vmd).isAttachable(); checkAttachPermission(); return new SolarisVirtualMachine(this, vmd.id()); } else { return attachVirtualMachine(vmd.id()); } }
Example 2
Source File: AixAttachProvider.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
public VirtualMachine attachVirtualMachine(VirtualMachineDescriptor vmd) throws AttachNotSupportedException, IOException { if (vmd.provider() != this) { throw new AttachNotSupportedException("provider mismatch"); } // To avoid re-checking if the VM if attachable, we check if the descriptor // is for a hotspot VM - these descriptors are created by the listVirtualMachines // implementation which only returns a list of attachable VMs. if (vmd instanceof HotSpotVirtualMachineDescriptor) { assert ((HotSpotVirtualMachineDescriptor)vmd).isAttachable(); checkAttachPermission(); return new AixVirtualMachine(this, vmd.id()); } else { return attachVirtualMachine(vmd.id()); } }
Example 3
Source File: BsdAttachProvider.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
public VirtualMachine attachVirtualMachine(VirtualMachineDescriptor vmd) throws AttachNotSupportedException, IOException { if (vmd.provider() != this) { throw new AttachNotSupportedException("provider mismatch"); } // To avoid re-checking if the VM if attachable, we check if the descriptor // is for a hotspot VM - these descriptors are created by the listVirtualMachines // implementation which only returns a list of attachable VMs. if (vmd instanceof HotSpotVirtualMachineDescriptor) { assert ((HotSpotVirtualMachineDescriptor)vmd).isAttachable(); checkAttachPermission(); return new BsdVirtualMachine(this, vmd.id()); } else { return attachVirtualMachine(vmd.id()); } }
Example 4
Source File: AixAttachProvider.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
public VirtualMachine attachVirtualMachine(VirtualMachineDescriptor vmd) throws AttachNotSupportedException, IOException { if (vmd.provider() != this) { throw new AttachNotSupportedException("provider mismatch"); } // To avoid re-checking if the VM if attachable, we check if the descriptor // is for a hotspot VM - these descriptors are created by the listVirtualMachines // implementation which only returns a list of attachable VMs. if (vmd instanceof HotSpotVirtualMachineDescriptor) { assert ((HotSpotVirtualMachineDescriptor)vmd).isAttachable(); checkAttachPermission(); return new AixVirtualMachine(this, vmd.id()); } else { return attachVirtualMachine(vmd.id()); } }
Example 5
Source File: SolarisAttachProvider.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
public VirtualMachine attachVirtualMachine(VirtualMachineDescriptor vmd) throws AttachNotSupportedException, IOException { if (vmd.provider() != this) { throw new AttachNotSupportedException("provider mismatch"); } // To avoid re-checking if the VM if attachable, we check if the descriptor // is for a hotspot VM - these descriptors are created by the listVirtualMachines // implementation which only returns a list of attachable VMs. if (vmd instanceof HotSpotVirtualMachineDescriptor) { assert ((HotSpotVirtualMachineDescriptor)vmd).isAttachable(); checkAttachPermission(); return new SolarisVirtualMachine(this, vmd.id()); } else { return attachVirtualMachine(vmd.id()); } }
Example 6
Source File: LinuxAttachProvider.java From hottub with GNU General Public License v2.0 | 6 votes |
public VirtualMachine attachVirtualMachine(VirtualMachineDescriptor vmd) throws AttachNotSupportedException, IOException { if (vmd.provider() != this) { throw new AttachNotSupportedException("provider mismatch"); } // To avoid re-checking if the VM if attachable, we check if the descriptor // is for a hotspot VM - these descriptors are created by the listVirtualMachines // implementation which only returns a list of attachable VMs. if (vmd instanceof HotSpotVirtualMachineDescriptor) { assert ((HotSpotVirtualMachineDescriptor)vmd).isAttachable(); checkAttachPermission(); return new LinuxVirtualMachine(this, vmd.id()); } else { return attachVirtualMachine(vmd.id()); } }
Example 7
Source File: AixAttachProvider.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
public VirtualMachine attachVirtualMachine(VirtualMachineDescriptor vmd) throws AttachNotSupportedException, IOException { if (vmd.provider() != this) { throw new AttachNotSupportedException("provider mismatch"); } // To avoid re-checking if the VM if attachable, we check if the descriptor // is for a hotspot VM - these descriptors are created by the listVirtualMachines // implementation which only returns a list of attachable VMs. if (vmd instanceof HotSpotVirtualMachineDescriptor) { assert ((HotSpotVirtualMachineDescriptor)vmd).isAttachable(); checkAttachPermission(); return new AixVirtualMachine(this, vmd.id()); } else { return attachVirtualMachine(vmd.id()); } }
Example 8
Source File: LinuxAttachProvider.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public VirtualMachine attachVirtualMachine(VirtualMachineDescriptor vmd) throws AttachNotSupportedException, IOException { if (vmd.provider() != this) { throw new AttachNotSupportedException("provider mismatch"); } // To avoid re-checking if the VM if attachable, we check if the descriptor // is for a hotspot VM - these descriptors are created by the listVirtualMachines // implementation which only returns a list of attachable VMs. if (vmd instanceof HotSpotVirtualMachineDescriptor) { assert ((HotSpotVirtualMachineDescriptor)vmd).isAttachable(); checkAttachPermission(); return new LinuxVirtualMachine(this, vmd.id()); } else { return attachVirtualMachine(vmd.id()); } }
Example 9
Source File: BsdAttachProvider.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public VirtualMachine attachVirtualMachine(VirtualMachineDescriptor vmd) throws AttachNotSupportedException, IOException { if (vmd.provider() != this) { throw new AttachNotSupportedException("provider mismatch"); } // To avoid re-checking if the VM if attachable, we check if the descriptor // is for a hotspot VM - these descriptors are created by the listVirtualMachines // implementation which only returns a list of attachable VMs. if (vmd instanceof HotSpotVirtualMachineDescriptor) { assert ((HotSpotVirtualMachineDescriptor)vmd).isAttachable(); checkAttachPermission(); return new BsdVirtualMachine(this, vmd.id()); } else { return attachVirtualMachine(vmd.id()); } }
Example 10
Source File: BsdAttachProvider.java From hottub with GNU General Public License v2.0 | 6 votes |
public VirtualMachine attachVirtualMachine(VirtualMachineDescriptor vmd) throws AttachNotSupportedException, IOException { if (vmd.provider() != this) { throw new AttachNotSupportedException("provider mismatch"); } // To avoid re-checking if the VM if attachable, we check if the descriptor // is for a hotspot VM - these descriptors are created by the listVirtualMachines // implementation which only returns a list of attachable VMs. if (vmd instanceof HotSpotVirtualMachineDescriptor) { assert ((HotSpotVirtualMachineDescriptor)vmd).isAttachable(); checkAttachPermission(); return new BsdVirtualMachine(this, vmd.id()); } else { return attachVirtualMachine(vmd.id()); } }
Example 11
Source File: LinuxAttachProvider.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public VirtualMachine attachVirtualMachine(VirtualMachineDescriptor vmd) throws AttachNotSupportedException, IOException { if (vmd.provider() != this) { throw new AttachNotSupportedException("provider mismatch"); } // To avoid re-checking if the VM if attachable, we check if the descriptor // is for a hotspot VM - these descriptors are created by the listVirtualMachines // implementation which only returns a list of attachable VMs. if (vmd instanceof HotSpotVirtualMachineDescriptor) { assert ((HotSpotVirtualMachineDescriptor)vmd).isAttachable(); checkAttachPermission(); return new LinuxVirtualMachine(this, vmd.id()); } else { return attachVirtualMachine(vmd.id()); } }
Example 12
Source File: BsdAttachProvider.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
public VirtualMachine attachVirtualMachine(VirtualMachineDescriptor vmd) throws AttachNotSupportedException, IOException { if (vmd.provider() != this) { throw new AttachNotSupportedException("provider mismatch"); } // To avoid re-checking if the VM if attachable, we check if the descriptor // is for a hotspot VM - these descriptors are created by the listVirtualMachines // implementation which only returns a list of attachable VMs. if (vmd instanceof HotSpotVirtualMachineDescriptor) { assert ((HotSpotVirtualMachineDescriptor)vmd).isAttachable(); checkAttachPermission(); return new BsdVirtualMachine(this, vmd.id()); } else { return attachVirtualMachine(vmd.id()); } }
Example 13
Source File: BsdAttachProvider.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
public VirtualMachine attachVirtualMachine(VirtualMachineDescriptor vmd) throws AttachNotSupportedException, IOException { if (vmd.provider() != this) { throw new AttachNotSupportedException("provider mismatch"); } // To avoid re-checking if the VM if attachable, we check if the descriptor // is for a hotspot VM - these descriptors are created by the listVirtualMachines // implementation which only returns a list of attachable VMs. if (vmd instanceof HotSpotVirtualMachineDescriptor) { assert ((HotSpotVirtualMachineDescriptor)vmd).isAttachable(); checkAttachPermission(); return new BsdVirtualMachine(this, vmd.id()); } else { return attachVirtualMachine(vmd.id()); } }
Example 14
Source File: LinuxAttachProvider.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
public VirtualMachine attachVirtualMachine(VirtualMachineDescriptor vmd) throws AttachNotSupportedException, IOException { if (vmd.provider() != this) { throw new AttachNotSupportedException("provider mismatch"); } // To avoid re-checking if the VM if attachable, we check if the descriptor // is for a hotspot VM - these descriptors are created by the listVirtualMachines // implementation which only returns a list of attachable VMs. if (vmd instanceof HotSpotVirtualMachineDescriptor) { assert ((HotSpotVirtualMachineDescriptor)vmd).isAttachable(); checkAttachPermission(); return new LinuxVirtualMachine(this, vmd.id()); } else { return attachVirtualMachine(vmd.id()); } }
Example 15
Source File: SolarisAttachProvider.java From hottub with GNU General Public License v2.0 | 6 votes |
public VirtualMachine attachVirtualMachine(VirtualMachineDescriptor vmd) throws AttachNotSupportedException, IOException { if (vmd.provider() != this) { throw new AttachNotSupportedException("provider mismatch"); } // To avoid re-checking if the VM if attachable, we check if the descriptor // is for a hotspot VM - these descriptors are created by the listVirtualMachines // implementation which only returns a list of attachable VMs. if (vmd instanceof HotSpotVirtualMachineDescriptor) { assert ((HotSpotVirtualMachineDescriptor)vmd).isAttachable(); checkAttachPermission(); return new SolarisVirtualMachine(this, vmd.id()); } else { return attachVirtualMachine(vmd.id()); } }
Example 16
Source File: SolarisAttachProvider.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
public VirtualMachine attachVirtualMachine(VirtualMachineDescriptor vmd) throws AttachNotSupportedException, IOException { if (vmd.provider() != this) { throw new AttachNotSupportedException("provider mismatch"); } // To avoid re-checking if the VM if attachable, we check if the descriptor // is for a hotspot VM - these descriptors are created by the listVirtualMachines // implementation which only returns a list of attachable VMs. if (vmd instanceof HotSpotVirtualMachineDescriptor) { assert ((HotSpotVirtualMachineDescriptor)vmd).isAttachable(); checkAttachPermission(); return new SolarisVirtualMachine(this, vmd.id()); } else { return attachVirtualMachine(vmd.id()); } }
Example 17
Source File: AttachProvider.java From jdk8u60 with GNU General Public License v2.0 | 3 votes |
/** * Attaches to a Java virtual machine. * * <p> A Java virtual machine can be described using a {@link * com.sun.tools.attach.VirtualMachineDescriptor VirtualMachineDescriptor}. * This method invokes the descriptor's {@link * com.sun.tools.attach.VirtualMachineDescriptor#provider() provider()} method * to check that it is equal to this provider. It then attempts to attach to the * Java virtual machine. * * @param vmd * The virtual machine descriptor * * @return VirtualMachine representing the target virtual machine. * * @throws SecurityException * If a security manager has been installed and it denies * {@link com.sun.tools.attach.AttachPermission AttachPermission} * <tt>("attachVirtualMachine")</tt>, or other permission * required by the implementation. * * @throws AttachNotSupportedException * If the descriptor's {@link * com.sun.tools.attach.VirtualMachineDescriptor#provider() provider()} method * returns a provider that is not this provider, or it does not correspond * to a Java virtual machine to which this provider can attach. * * @throws IOException * If some other I/O error occurs * * @throws NullPointerException * If <code>vmd</code> is <code>null</code> */ public VirtualMachine attachVirtualMachine(VirtualMachineDescriptor vmd) throws AttachNotSupportedException, IOException { if (vmd.provider() != this) { throw new AttachNotSupportedException("provider mismatch"); } return attachVirtualMachine(vmd.id()); }
Example 18
Source File: AttachProvider.java From jdk8u-jdk with GNU General Public License v2.0 | 3 votes |
/** * Attaches to a Java virtual machine. * * <p> A Java virtual machine can be described using a {@link * com.sun.tools.attach.VirtualMachineDescriptor VirtualMachineDescriptor}. * This method invokes the descriptor's {@link * com.sun.tools.attach.VirtualMachineDescriptor#provider() provider()} method * to check that it is equal to this provider. It then attempts to attach to the * Java virtual machine. * * @param vmd * The virtual machine descriptor * * @return VirtualMachine representing the target virtual machine. * * @throws SecurityException * If a security manager has been installed and it denies * {@link com.sun.tools.attach.AttachPermission AttachPermission} * <tt>("attachVirtualMachine")</tt>, or other permission * required by the implementation. * * @throws AttachNotSupportedException * If the descriptor's {@link * com.sun.tools.attach.VirtualMachineDescriptor#provider() provider()} method * returns a provider that is not this provider, or it does not correspond * to a Java virtual machine to which this provider can attach. * * @throws IOException * If some other I/O error occurs * * @throws NullPointerException * If <code>vmd</code> is <code>null</code> */ public VirtualMachine attachVirtualMachine(VirtualMachineDescriptor vmd) throws AttachNotSupportedException, IOException { if (vmd.provider() != this) { throw new AttachNotSupportedException("provider mismatch"); } return attachVirtualMachine(vmd.id()); }
Example 19
Source File: AttachProvider.java From openjdk-8 with GNU General Public License v2.0 | 3 votes |
/** * Attaches to a Java virtual machine. * * <p> A Java virtual machine can be described using a {@link * com.sun.tools.attach.VirtualMachineDescriptor VirtualMachineDescriptor}. * This method invokes the descriptor's {@link * com.sun.tools.attach.VirtualMachineDescriptor#provider() provider()} method * to check that it is equal to this provider. It then attempts to attach to the * Java virtual machine. * * @param vmd * The virtual machine descriptor * * @return VirtualMachine representing the target virtual machine. * * @throws SecurityException * If a security manager has been installed and it denies * {@link com.sun.tools.attach.AttachPermission AttachPermission} * <tt>("attachVirtualMachine")</tt>, or other permission * required by the implementation. * * @throws AttachNotSupportedException * If the descriptor's {@link * com.sun.tools.attach.VirtualMachineDescriptor#provider() provider()} method * returns a provider that is not this provider, or it does not correspond * to a Java virtual machine to which this provider can attach. * * @throws IOException * If some other I/O error occurs * * @throws NullPointerException * If <code>vmd</code> is <code>null</code> */ public VirtualMachine attachVirtualMachine(VirtualMachineDescriptor vmd) throws AttachNotSupportedException, IOException { if (vmd.provider() != this) { throw new AttachNotSupportedException("provider mismatch"); } return attachVirtualMachine(vmd.id()); }
Example 20
Source File: AttachProvider.java From jdk8u-jdk with GNU General Public License v2.0 | 3 votes |
/** * Attaches to a Java virtual machine. * * <p> A Java virtual machine can be described using a {@link * com.sun.tools.attach.VirtualMachineDescriptor VirtualMachineDescriptor}. * This method invokes the descriptor's {@link * com.sun.tools.attach.VirtualMachineDescriptor#provider() provider()} method * to check that it is equal to this provider. It then attempts to attach to the * Java virtual machine. * * @param vmd * The virtual machine descriptor * * @return VirtualMachine representing the target virtual machine. * * @throws SecurityException * If a security manager has been installed and it denies * {@link com.sun.tools.attach.AttachPermission AttachPermission} * <tt>("attachVirtualMachine")</tt>, or other permission * required by the implementation. * * @throws AttachNotSupportedException * If the descriptor's {@link * com.sun.tools.attach.VirtualMachineDescriptor#provider() provider()} method * returns a provider that is not this provider, or it does not correspond * to a Java virtual machine to which this provider can attach. * * @throws IOException * If some other I/O error occurs * * @throws NullPointerException * If <code>vmd</code> is <code>null</code> */ public VirtualMachine attachVirtualMachine(VirtualMachineDescriptor vmd) throws AttachNotSupportedException, IOException { if (vmd.provider() != this) { throw new AttachNotSupportedException("provider mismatch"); } return attachVirtualMachine(vmd.id()); }