Package com.tnsai.quality.redaction
Interface RedactionAuditListener
- All Known Implementing Classes:
LoggingRedactionAuditListener
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Sink for
RedactionAuditEvents emitted by AuditingRedactor
(issue #80).
Implementations forward the event to whatever audit infrastructure
the operator has — Slack, Datadog, Prometheus counters, an
audit-only Kafka topic, or just SLF4J. The listener gets one call
per scrub that produced findings; the redactor never blocks on the
listener (decorator wraps each call in try/catch — see AuditingRedactor).
Thread-safety: implementations MUST be safe to call from any thread; the redactor is shared across the framework.
- Since:
- 0.9.0 (issue #80)
-
Method Summary
Modifier and TypeMethodDescriptionstatic RedactionAuditListenernoop()No-op listener — used when audit emission is opt-out or when tests don't care about the audit channel.voidonRedaction(RedactionAuditEvent event) Called once per scrub that produced at least one finding.
-
Method Details
-
onRedaction
Called once per scrub that produced at least one finding. Implementations should not throw — theAuditingRedactordecorator catches anything to keep audit failures from breaking the redaction hot path, but a clean implementation never relies on that safety net.- Parameters:
event- aggregated audit info; never null
-
noop
No-op listener — used when audit emission is opt-out or when tests don't care about the audit channel.
-