Class VirtualMachineProcessHandleProvider
java.lang.Object
org.apache.nifi.bootstrap.command.process.VirtualMachineProcessHandleProvider
- All Implemented Interfaces:
ProcessHandleProvider
Virtual Machine implementation of ProcessHandle Provider using the Attach API with System Properties
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ConfigurationProvider
private static final org.slf4j.Logger
-
Constructor Summary
ConstructorsConstructorDescriptionVirtualMachineProcessHandleProvider
(ConfigurationProvider configurationProvider) -
Method Summary
Modifier and TypeMethodDescriptionFind Process Handle for Application based on matching argument for path to application propertiesFind Process Handle for Bootstrap based on matching argument for path to bootstrap configurationprivate Optional
<ProcessHandle> findProcessHandle
(VirtualMachineDescriptor descriptor, SystemProperty systemProperty, Path configuration) private Optional
<ProcessHandle> findProcessHandle
(VirtualMachine virtualMachine, SystemProperty systemProperty, Path configuration) private Optional
<ProcessHandle> findProcessHandle
(SystemProperty systemProperty, Path configuration)
-
Field Details
-
logger
private static final org.slf4j.Logger logger -
configurationProvider
-
-
Constructor Details
-
VirtualMachineProcessHandleProvider
-
-
Method Details
-
findApplicationProcessHandle
Find Process Handle for Application based on matching argument for path to application properties- Specified by:
findApplicationProcessHandle
in interfaceProcessHandleProvider
- Returns:
- Application Process Handle or empty when not found
-
findBootstrapProcessHandle
Find Process Handle for Bootstrap based on matching argument for path to bootstrap configuration- Specified by:
findBootstrapProcessHandle
in interfaceProcessHandleProvider
- Returns:
- Bootstrap Process Handle or empty when not found
-
findProcessHandle
private Optional<ProcessHandle> findProcessHandle(SystemProperty systemProperty, Path configuration) -
findProcessHandle
private Optional<ProcessHandle> findProcessHandle(VirtualMachineDescriptor descriptor, SystemProperty systemProperty, Path configuration) -
findProcessHandle
private Optional<ProcessHandle> findProcessHandle(VirtualMachine virtualMachine, SystemProperty systemProperty, Path configuration) throws IOException - Throws:
IOException
-