Class Win32Process

java.lang.Object
io.github.eggy03.ferrumx.windows.entity.system.Win32Process

@ShallowImmutable public class Win32Process extends Object
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

    Fields
    Modifier and Type
    Field
    Description
    (package private) @Nullable String
    Short one-line description of the process.
    (package private) @Nullable String
    Date/time when the process was created.
    (package private) @Nullable String
    Full description of the process.
    (package private) @Nullable String
    Full path to the executable file of the process.
    (package private) @Nullable Integer
    Current execution state of the process.
    (package private) @Nullable String
    Handle of the process (string representation of ProcessId).
    (package private) @Nullable Long
    Number of handles currently open by the process.
    (package private) @Nullable BigInteger
    Time spent by the process in kernel mode (in ms).
    (package private) @Nullable String
    Name of the executable file responsible for this process.
    (package private) @Nullable Long
    Current amount of page file usage (kilobytes).
    (package private) @Nullable Long
    Peak page file usage (kilobytes).
    (package private) @Nullable BigInteger
    Peak virtual address space used by the process (bytes).
    (package private) @Nullable BigInteger
    Peak working set size (in KB) of the process.
    (package private) @Nullable Long
    Scheduling priority of the process.
    (package private) @Nullable BigInteger
    Current number of private memory pages used by the process.
    (package private) @Nullable Long
    Unique identifier of the process.
    (package private) @Nullable Long
    Identifier of the session under which this process is running.
    (package private) @Nullable String
    Date/time when the process was terminated (if available).
    (package private) @Nullable Long
    Number of active threads in the process.
    (package private) @Nullable BigInteger
    Time spent by the process in user mode (in ms).
    (package private) @Nullable BigInteger
    Current virtual address space used by the process (bytes).
    (package private) @Nullable BigInteger
    Current working set size (in bytes) used by the process.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull String
    Retrieves the entity in a JSON pretty-print formatted string

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • processId

      @SerializedName("ProcessId") @Nullable @Nullable Long processId
      Unique identifier of the process.
    • sessionId

      @SerializedName("SessionId") @Nullable @Nullable Long sessionId
      Identifier of the session under which this process is running.
    • name

      @SerializedName("Name") @Nullable @Nullable String name
      Name of the executable file responsible for this process.
    • caption

      @SerializedName("Caption") @Nullable @Nullable String caption
      Short one-line description of the process.
    • description

      @SerializedName("Description") @Nullable @Nullable String description
      Full description of the process.
    • executablePath

      @SerializedName("ExecutablePath") @Nullable @Nullable String executablePath
      Full path to the executable file of the process.
    • executionState

      @SerializedName("ExecutionState") @Nullable @Nullable Integer 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

      @SerializedName("Handle") @Nullable @Nullable String handle
      Handle of the process (string representation of ProcessId).
    • handleCount

      @SerializedName("HandleCount") @Nullable @Nullable Long handleCount
      Number of handles currently open by the process.
    • priority

      @SerializedName("Priority") @Nullable @Nullable Long priority
      Scheduling priority of the process.
      • 0 (lowest) to 31 (highest)
    • threadCount

      @SerializedName("ThreadCount") @Nullable @Nullable Long threadCount
      Number of active threads in the process.
    • kernelModeTime

      @SerializedName("KernelModeTime") @Nullable @Nullable BigInteger kernelModeTime
      Time spent by the process in kernel mode (in ms).
    • userModeTime

      @SerializedName("UserModeTime") @Nullable @Nullable BigInteger userModeTime
      Time spent by the process in user mode (in ms).
    • workingSetSize

      @SerializedName("WorkingSetSize") @Nullable @Nullable BigInteger workingSetSize
      Current working set size (in bytes) used by the process.
    • peakWorkingSetSize

      @SerializedName("PeakWorkingSetSize") @Nullable @Nullable BigInteger peakWorkingSetSize
      Peak working set size (in KB) of the process.
    • privatePageCount

      @SerializedName("PrivatePageCount") @Nullable @Nullable BigInteger privatePageCount
      Current number of private memory pages used by the process.
    • pageFileUsage

      @SerializedName("PageFileUsage") @Nullable @Nullable Long pageFileUsage
      Current amount of page file usage (kilobytes).
    • peakPageFileUsage

      @SerializedName("PeakPageFileUsage") @Nullable @Nullable Long peakPageFileUsage
      Peak page file usage (kilobytes).
    • virtualSize

      @SerializedName("VirtualSize") @Nullable @Nullable BigInteger virtualSize
      Current virtual address space used by the process (bytes).
    • peakVirtualSize

      @SerializedName("PeakVirtualSize") @Nullable @Nullable BigInteger peakVirtualSize
      Peak virtual address space used by the process (bytes).
    • creationDate

      @SerializedName("CreationDate") @Nullable @Nullable String creationDate
      Date/time when the process was created.
    • terminationDate

      @SerializedName("TerminationDate") @Nullable @Nullable String terminationDate
      Date/time when the process was terminated (if available).
  • Constructor Details

    • Win32Process

      public Win32Process()
  • Method Details

    • toString

      @NotNull public @NotNull String toString()
      Retrieves the entity in a JSON pretty-print formatted string
      Overrides:
      toString in class Object
      Returns:
      the String value of the object in JSON pretty-print format