Class AuditEventHandlerBase
java.lang.Object
org.forgerock.audit.events.handlers.AuditEventHandlerBase
- All Implemented Interfaces:
AuditEventHandler
- Direct Known Subclasses:
CsvAuditEventHandler
,ElasticsearchAuditEventHandler
,JdbcAuditEventHandler
,JmsAuditEventHandler
,JsonAuditEventHandler
,JsonStdoutAuditEventHandler
,NoOpAuditEventHandler
,SplunkAuditEventHandler
,SyslogAuditEventHandler
Abstract AuditEventHandler class.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final EventTopicsMetaData
The event topic meta data for the handler. -
Constructor Summary
ModifierConstructorDescriptionprotected
AuditEventHandlerBase
(String name, EventTopicsMetaData eventTopicsMetaData, Set<String> acceptedTopics, boolean enabled) Create a new AuditEventHandler instance. -
Method Summary
Modifier and TypeMethodDescriptionGets the names of all audit event topics this handler is registered against.getName()
Gets the name of this audit event handler.handleAction
(Context context, String topic, ActionRequest request) Performs an action.boolean
Checks if the audit event handler is enabled.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.forgerock.audit.events.handlers.AuditEventHandler
publishEvent, queryEvents, readEvent, shutdown, startup
-
Field Details
-
eventTopicsMetaData
The event topic meta data for the handler.
-
-
Constructor Details
-
AuditEventHandlerBase
protected AuditEventHandlerBase(String name, EventTopicsMetaData eventTopicsMetaData, Set<String> acceptedTopics, boolean enabled) Create a new AuditEventHandler instance.- Parameters:
name
- The name of this AuditEventHandler.eventTopicsMetaData
- Provides meta-data describing the audit event topics this AuditEventHandler may have to handle.acceptedTopics
- Audit event topics the AuditEventHandler will handle.enabled
- Whether or not the audit event handler is enabled.
-
-
Method Details
-
getName
Description copied from interface:AuditEventHandler
Gets the name of this audit event handler.- Specified by:
getName
in interfaceAuditEventHandler
- Returns:
- this handler's name.
-
getHandledTopics
Description copied from interface:AuditEventHandler
Gets the names of all audit event topics this handler is registered against.- Specified by:
getHandledTopics
in interfaceAuditEventHandler
- Returns:
- the names of all topics handled by this object.
-
isEnabled
public boolean isEnabled()Description copied from interface:AuditEventHandler
Checks if the audit event handler is enabled.- Specified by:
isEnabled
in interfaceAuditEventHandler
- Returns:
- whether or not the audit event handler is enabled
-
handleAction
public Promise<ActionResponse,ResourceException> handleAction(Context context, String topic, ActionRequest request) Description copied from interface:AuditEventHandler
Performs an action.- Specified by:
handleAction
in interfaceAuditEventHandler
- Parameters:
context
- The context chain that initiated the event.topic
- The topic on which action is performed.request
- The request with the action.- Returns:
- a promise with either a response or an exception
-