public class PlatformUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static VirtualMachineHandlerOperations |
createVMAccess(OptionsAndArgs options) |
static ProcessDescription |
findProcess(Pattern pPattern,
List<ProcessDescription> processes) |
static String |
getProcessId(VirtualMachineHandlerOperations pHandler,
OptionsAndArgs pOpts)
Get the process id, either directly from option's ID or by looking up a regular expression for java process name
(but not this java process)
|
public static VirtualMachineHandlerOperations createVMAccess(OptionsAndArgs options)
public static ProcessDescription findProcess(Pattern pPattern, List<ProcessDescription> processes)
public static String getProcessId(VirtualMachineHandlerOperations pHandler, OptionsAndArgs pOpts)
pHandler - platform-specific way to invoke operations on VMpOpts - used to get eithe the process Id (OptionsAndArgs.getPid() or the pattern for matching a
process name (OptionsAndArgs.getProcessPattern())IllegalArgumentException - if a pattern is used and no or more than one process name matches.Copyright © 2022. All rights reserved.