use of com.sun.tools.attach.VirtualMachineDescriptor in project openj9 by eclipse.
the class TestAttachAPI method findVmdForPid.
private VirtualMachineDescriptor findVmdForPid(AttachProvider provider, String pid) {
List<VirtualMachineDescriptor> vmdList = provider.listVirtualMachines();
if (vmdList.size() < 1) {
return null;
}
Iterator<VirtualMachineDescriptor> vmdi = vmdList.iterator();
VirtualMachineDescriptor vmd = null;
while (vmdi.hasNext()) {
VirtualMachineDescriptor tempVmd = vmdi.next();
if (tempVmd.id().equals(pid)) {
vmd = tempVmd;
break;
}
}
return vmd;
}
Aggregations