Interface AuditContext
- All Known Subinterfaces:
BalpAuditContext
- All Known Implementing Classes:
DefaultAuditContext
,DefaultBalpAuditContext
public interface AuditContext
AuditContext is the central location where all aspects of serializing and sending out
Audit messages are defined. This includes
- whether auditing is enabled at all
- the transmission protocol (UDP, TLS, ...)
- the queue implementation (synchronous, asynchronous, ...
- the serialization strategy (e.g. which DICOM audit version shall be used)
- global parameters like source ID, enterprise ID
- Since:
- 3.5
- Author:
- Christian Ohr
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
audit
(AuditMessage... messages) Sends out the (potentially post-processed) audit messages as configured in this audit contextdefault AuditMessagePostProcessor
default AuditMetadataProvider
int
default String
Returns a value that is used when an otherwise mandatory attribute for an audit record in missing (e.g.default SerializationStrategy
boolean
boolean
Determines whether participant object records shall be added to the audit message that are derived from the response of a request.static AuditContext
noAudit()
void
setAuditEnabled
(boolean auditEnabled) Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Details
-
isAuditEnabled
boolean isAuditEnabled()- Returns:
- true if auditing is enabled, false otherwise
-
setAuditEnabled
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
auditEnabled
- enable or disable auditing
-
getAuditRepositoryHostName
String getAuditRepositoryHostName()- Returns:
- hostname of the audit repository
-
getAuditRepositoryAddress
InetAddress getAuditRepositoryAddress()- Returns:
- address of the audit repository
-
getAuditRepositoryPort
int getAuditRepositoryPort()- Returns:
- port of the audit repository
-
getSendingApplication
String getSendingApplication()- Returns:
- sending application
-
getAuditTransmissionProtocol
AuditTransmissionProtocol getAuditTransmissionProtocol()- Returns:
- the wire protocol to be used
-
getAuditMessageQueue
AuditMessageQueue getAuditMessageQueue()- Returns:
- the queue implementation to be used
-
getTlsParameters
TlsParameters getTlsParameters()- Returns:
- the SSL socket factory to be used for TLS-based connections
-
getAuditMessagePostProcessor
- Returns:
- a post-processor for audit messages (defaults to a NO-OP implementation
-
getSerializationStrategy
- Returns:
- the serialization strategy (defaults to the latest relevant DICOM version)
-
audit
Sends out the (potentially post-processed) audit messages as configured in this audit context- Parameters:
messages
- audit messages to be sent
-
getAuditMetadataProvider
-
getAuditValueIfMissing
Returns a value that is used when an otherwise mandatory attribute for an audit record in missing (e.g. a participant object ID). In this case, we can still write an audit record (e.g. documenting a failed request due to the missing attribute).This can also be set to null at the risk that building the audit record might throw an exception.
- Returns:
- a value that is used when an otherwise mandatory attribute for an audit record in missing
-
getAuditSourceId
String getAuditSourceId()- Returns:
- Source ID attribute of the audit event
-
getAuditEnterpriseSiteId
String getAuditEnterpriseSiteId()- Returns:
- Enterprise site ID attribute of the audit event
-
getAuditSource
AuditSource getAuditSource()- Returns:
- type of audit source
-
getAuditExceptionHandler
AuditExceptionHandler getAuditExceptionHandler()- Returns:
- exception handler
-
isIncludeParticipantsFromResponse
boolean isIncludeParticipantsFromResponse()Determines whether participant object records shall be added to the audit message that are derived from the response of a request. This specifically applies to query results. The DICOM audit specification states that this should not be the case, however, project and legal requirements sometimes mandate that e.g. patient identifiers being retrieved shall be audited.- Returns:
- true if participant object records shall be added, otherwise false
-
noAudit
-