@Singleton public class AuditEventPublisherImpl extends Object implements AuditEventPublisher
Constructor and Description |
---|
AuditEventPublisherImpl(AuditServiceProvider auditServiceProvider)
Constructs a new
AuditEventPublisher . |
Modifier and Type | Method and Description |
---|---|
boolean |
isAuditing(String realm,
String topic,
AuditConstants.EventName eventName)
Determines if the audit service is auditing the specified topic in the specified realm.
|
void |
tryPublish(String topic,
org.forgerock.audit.events.AuditEvent auditEvent)
Tries to publish the provided AuditEvent to the specified topic of the AuditService.
|
@Inject public AuditEventPublisherImpl(AuditServiceProvider auditServiceProvider)
AuditEventPublisher
.auditServiceProvider
- A AuditServiceProvider
instance.public void tryPublish(String topic, org.forgerock.audit.events.AuditEvent auditEvent)
AuditEventPublisher
tryPublish
in interface AuditEventPublisher
topic
- Coarse-grained categorization of the AuditEvent's type.auditEvent
- The AuditEvent to publish.public boolean isAuditing(String realm, String topic, AuditConstants.EventName eventName)
AuditEventPublisher
null
or empty, the check will be done against the default audit service.
Note that We deliberately do not provide a convenience method with no realm to force implementers to consider
providing the realm. We must publish per realm wherever applicable.isAuditing
in interface AuditEventPublisher
realm
- The realm in which the audit event occurred, or null if realm is not applicable.topic
- The auditing topic.eventName
- The event name, may be null if not known.true
if the topic should be audited.Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.