Class RecordingAuditMessageTransmission
java.lang.Object
org.openehealth.ipf.commons.audit.protocol.RecordingAuditMessageTransmission
- All Implemented Interfaces:
AuditTransmissionProtocol
For testing only: an implementation that records the audit message strings in memory instead of sending them to
some destination. After some time, this will cause OutOfMemoryErrors.
- Since:
- 3.5
- Author:
- Christian Ohr
-
Field Summary
Fields inherited from interface org.openehealth.ipf.commons.audit.protocol.AuditTransmissionProtocol
HTTPS_CIPHERSUITES, JAVAX_NET_DEBUG, JAVAX_NET_SSL_KEYSTORE, JAVAX_NET_SSL_KEYSTORE_PASSWORD, JAVAX_NET_SSL_KEYSTORE_TYPE, JAVAX_NET_SSL_TRUSTSTORE, JAVAX_NET_SSL_TRUSTSTORE_PASSWORD, JAVAX_NET_SSL_TRUSTSTORE_TYPE, JAVAX_TLS_CLIENT_CIPHERSUITES, JAVAX_TLS_SERVER_CIPHERSUITES, JDK_TLS_CLIENT_PROTOCOLS
-
Constructor Summary
ConstructorDescriptionThis constructor is required to allow instantiation by the Spring Boot starter. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clears the message listvoid
send
(AuditContext auditContext, AuditMetadataProvider auditMetadataProvider, String auditMessage) Transmits the messagevoid
setConsumer
(Consumer<String> consumer) void
shutdown()
May be implemented to clean up instances on shut downMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.openehealth.ipf.commons.audit.protocol.AuditTransmissionProtocol
send
-
Constructor Details
-
RecordingAuditMessageTransmission
public RecordingAuditMessageTransmission() -
RecordingAuditMessageTransmission
This constructor is required to allow instantiation by the Spring Boot starter.
-
-
Method Details
-
send
public void send(AuditContext auditContext, AuditMetadataProvider auditMetadataProvider, String auditMessage) Description copied from interface:AuditTransmissionProtocol
Transmits the message- Specified by:
send
in interfaceAuditTransmissionProtocol
- Parameters:
auditContext
- audit context that e.g. contains the destinationauditMetadataProvider
- dedicated (message-specific) audit metadataauditMessage
- audit message strings
-
shutdown
public void shutdown()Description copied from interface:AuditTransmissionProtocol
May be implemented to clean up instances on shut down- Specified by:
shutdown
in interfaceAuditTransmissionProtocol
-
getTransportName
- Specified by:
getTransportName
in interfaceAuditTransmissionProtocol
- Returns:
- name of the AuditTransmissionProtocol
-
getMessages
-
getFirstMessage
-
clear
public void clear()Clears the message list -
setConsumer
-