Class KafkaService
- java.lang.Object
-
- org.linuxforhealth.fhir.audit.impl.KafkaService
-
- All Implemented Interfaces:
AuditLogService
public class KafkaService extends java.lang.Object implements AuditLogService
KafkaService orchestrates the call to Kafka so mappers and translators can be swapped out.
-
-
Constructor Summary
Constructors Constructor Description KafkaService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
initialize(PropertyGroup auditLogProperties)
Performs any required audit log service initialization using the passed Properties file.boolean
isEnabled()
void
logEntry(AuditLogEntry logEntry)
Persists the passed audit log entry in a location determined by the log service.void
stop(PropertyGroup auditLogProperties)
Performs any required audit log service stops-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.linuxforhealth.fhir.audit.AuditLogService
isLoggableOperation
-
-
-
-
Method Detail
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabled
in interfaceAuditLogService
- Returns:
- true if the audit log service is enabled; false if not enabled.
-
initialize
public void initialize(PropertyGroup auditLogProperties) throws java.lang.Exception
Description copied from interface:AuditLogService
Performs any required audit log service initialization using the passed Properties file.- Specified by:
initialize
in interfaceAuditLogService
- Parameters:
auditLogProperties
- - Contains audit log related properties which are configured in fhir-server-config.json.- Throws:
java.lang.Exception
- - Any non-recoverable exception thrown during audit log service initialization.
-
logEntry
public void logEntry(AuditLogEntry logEntry) throws java.lang.Exception
Description copied from interface:AuditLogService
Persists the passed audit log entry in a location determined by the log service.- Specified by:
logEntry
in interfaceAuditLogService
- Parameters:
logEntry
- - The audit log entry to be saved.- Throws:
java.lang.Exception
-
stop
public void stop(PropertyGroup auditLogProperties) throws java.lang.Exception
Description copied from interface:AuditLogService
Performs any required audit log service stops- Specified by:
stop
in interfaceAuditLogService
- Parameters:
auditLogProperties
- - Contains audit log related properties which are configured in fhir-server-config.json.- Throws:
java.lang.Exception
- - Any non-recoverable exception thrown during audit log service initialization.
-
-