Class SysmonKeys
java.lang.Object
com.guinetik.hexafun.examples.sysmon.SysmonKeys
Type-safe keys for the system monitor use cases and adapters.
Centralizing keys here provides:
- Single source of truth for all operations
- Compile-time type safety
- IDE discoverability
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final UseCaseKey<Void,SystemMetrics> Get all metrics at once.static final UseCaseKey<Void,Double> Get CPU usage.static final UseCaseKey<Void,Double> Get disk usage.static final UseCaseKey<Void,Double> Get memory usage.static final AdapterKey<SystemMetrics,String> Adapt to CLI format - plain text suitable for scripting.static final AdapterKey<SystemMetrics,String> Adapt to JSON format - machine-readable output.static final AdapterKey<SystemMetrics,String> Adapt to Prometheus format - metrics exposition format.static final AdapterKey<SystemMetrics,String> Adapt to TUI format - colorful progress bars with box drawing. -
Method Summary
-
Field Details
-
GET_CPU
Get CPU usage. Input: Void (no input needed), Output: Double (percentage). -
GET_MEMORY
Get memory usage. Input: Void, Output: Double (percentage). -
GET_DISK
Get disk usage. Input: Void, Output: Double (percentage). -
GET_ALL
Get all metrics at once. Input: Void, Output: SystemMetrics. -
TO_TUI
Adapt to TUI format - colorful progress bars with box drawing. -
TO_CLI
Adapt to CLI format - plain text suitable for scripting. -
TO_JSON
Adapt to JSON format - machine-readable output. -
TO_PROMETHEUS
Adapt to Prometheus format - metrics exposition format.
-