public final class ShieldSignals
- Object
- ShieldSignals
Collection point for runtime self-protection observations.
The framework’s own detections report here, and so can a cn1lib or the app itself when it notices something the platform checks cannot see – a failed server-side consistency check, a suspicious sequence of user actions. Everything recorded here is offered to the attestation service on the next token fetch, where the policy engine decides what it means.
The bus is bounded: it keeps only the most recent observations, and repeat reports of the same id collapse onto the existing entry rather than accumulating. A hooking framework that trips a detector on every frame must not be able to exhaust memory.
Methods
public static void add(ShieldSignal signal) | Records an observation. |
public static void add(String id, int severity, String detail) | Convenience overload for the common case. |
public static ShieldSignal[] snapshot() | The observations recorded so far. |
public static boolean hasSignalAtLeast(int severity) | True when any recorded observation is at or above the given severity. |
public static void clear() | Discards every recorded observation. |
Inherited methods
Method details
add
public static void add(ShieldSignal signal)Records an observation. Repeat reports of an id already present update that entry in place. Safe to call from any thread; listeners are notified on the EDT.
An identical repeat still updates the stored entry – the snapshot is meant to hold the most recent observation of each signal – but does not notify again.
add
public static void add(String id, int severity, String detail)snapshot
public static ShieldSignal[] snapshot()hasSignalAtLeast
public static boolean hasSignalAtLeast(int severity)clear
public static void clear()