Class Win32Process
java.lang.Object
io.github.eggy03.ferrumx.windows.entity.system.Win32Process
Immutable representation of a process in a Windows system.
Fields correspond to properties retrieved from the Win32_Process WMI class.
Usage examples
// Build a new Process instance
Win32Process process = Win32Process.builder()
.processId(19845)
.name("svchost.exe")
.priority(8)
.build();
// Create a modified copy using the builder
Win32Process updated = process.toBuilder()
.priority(1)
.build();
- Since:
- 3.0.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) @Nullable StringShort one-line description of the process.(package private) @Nullable StringDate/time when the process was created.(package private) @Nullable StringFull description of the process.(package private) @Nullable StringFull path to the executable file of the process.(package private) @Nullable IntegerCurrent execution state of the process.(package private) @Nullable StringHandle of the process (string representation of ProcessId).(package private) @Nullable LongNumber of handles currently open by the process.(package private) @Nullable BigIntegerTime spent by the process in kernel mode (in ms).(package private) @Nullable StringName of the executable file responsible for this process.(package private) @Nullable LongCurrent amount of page file usage (kilobytes).(package private) @Nullable LongPeak page file usage (kilobytes).(package private) @Nullable BigIntegerPeak virtual address space used by the process (bytes).(package private) @Nullable BigIntegerPeak working set size (in KB) of the process.(package private) @Nullable LongScheduling priority of the process.(package private) @Nullable BigIntegerCurrent number of private memory pages used by the process.(package private) @Nullable LongUnique identifier of the process.(package private) @Nullable LongIdentifier of the session under which this process is running.(package private) @Nullable StringDate/time when the process was terminated (if available).(package private) @Nullable LongNumber of active threads in the process.(package private) @Nullable BigIntegerTime spent by the process in user mode (in ms).(package private) @Nullable BigIntegerCurrent virtual address space used by the process (bytes).(package private) @Nullable BigIntegerCurrent working set size (in bytes) used by the process. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
processId
Unique identifier of the process. -
sessionId
Identifier of the session under which this process is running. -
name
Name of the executable file responsible for this process. -
caption
Short one-line description of the process. -
description
Full description of the process. -
executablePath
Full path to the executable file of the process. -
executionState
Current execution state of the process.- 0 — Unknown
- 1 — Other
- 2 — Ready
- 3 — Running
- 4 — Blocked
- 5 — Suspended Blocked
- 6 — Suspended Ready
- 7 — Terminated
- 8 — Stopped
- 9 — Growing
-
handle
Handle of the process (string representation of ProcessId). -
handleCount
Number of handles currently open by the process. -
priority
Scheduling priority of the process.- 0 (lowest) to 31 (highest)
-
threadCount
Number of active threads in the process. -
kernelModeTime
Time spent by the process in kernel mode (in ms). -
userModeTime
Time spent by the process in user mode (in ms). -
workingSetSize
Current working set size (in bytes) used by the process. -
peakWorkingSetSize
Peak working set size (in KB) of the process. -
privatePageCount
Current number of private memory pages used by the process. -
pageFileUsage
Current amount of page file usage (kilobytes). -
peakPageFileUsage
Peak page file usage (kilobytes). -
virtualSize
Current virtual address space used by the process (bytes). -
peakVirtualSize
Peak virtual address space used by the process (bytes). -
creationDate
Date/time when the process was created. -
terminationDate
Date/time when the process was terminated (if available).
-
-
Constructor Details
-
Win32Process
public Win32Process()
-
-
Method Details
-
toString
-