Class AsyncMemoryQueueBackedFhirClientBalpSink
java.lang.Object
ca.uhn.fhir.storage.interceptor.balp.FhirClientBalpSink
ca.uhn.fhir.storage.interceptor.balp.AsyncMemoryQueueBackedFhirClientBalpSink
- All Implemented Interfaces:
IBalpAuditEventSink
public class AsyncMemoryQueueBackedFhirClientBalpSink
extends FhirClientBalpSink
implements IBalpAuditEventSink
This implementation of the
IBalpAuditEventSink
transmits audit events to
a FHIR endpoint for creation, using a standard fhir create event. The target
server FHIR version does not need to match the FHIR version of the AuditEvent source,
events will be converted automatically prior to sending.
This sink transmits events asynchronously using an in-memory queue. This means that in the event of a server shutdown or unavailability of the target server data could be lost.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final org.hl7.fhir.instance.model.api.IBaseResource[]
Fields inherited from class ca.uhn.fhir.storage.interceptor.balp.FhirClientBalpSink
myClient
-
Constructor Summary
ConstructorDescriptionAsyncMemoryQueueBackedFhirClientBalpSink
(ca.uhn.fhir.context.FhirContext theFhirContext, String theTargetBaseUrl) Sets the FhirContext to use when initiating outgoing connectionsAsyncMemoryQueueBackedFhirClientBalpSink
(ca.uhn.fhir.context.FhirContext theFhirContext, String theTargetBaseUrl, List<Object> theClientInterceptors) Sets the FhirContext to use when initiating outgoing connectionsAsyncMemoryQueueBackedFhirClientBalpSink
(ca.uhn.fhir.rest.client.api.IGenericClient theClient) Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected void
recordAuditEvent
(org.hl7.fhir.instance.model.api.IBaseResource theAuditEvent) void
stop()
Methods inherited from class ca.uhn.fhir.storage.interceptor.balp.FhirClientBalpSink
recordAuditEvent, transmitEventToClient
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ca.uhn.fhir.storage.interceptor.balp.IBalpAuditEventSink
recordAuditEvent
-
Field Details
-
EMPTY_RESOURCE_ARRAY
-
-
Constructor Details
-
AsyncMemoryQueueBackedFhirClientBalpSink
public AsyncMemoryQueueBackedFhirClientBalpSink(@Nonnull ca.uhn.fhir.context.FhirContext theFhirContext, @Nonnull String theTargetBaseUrl) Sets the FhirContext to use when initiating outgoing connections- Parameters:
theFhirContext
- The FhirContext instance. This context must be for the FHIR Version supported by the target/sink server (as opposed to the FHIR Version supported by the audit source).theTargetBaseUrl
- The FHIR server base URL for the target/sink server to receive audit events.
-
AsyncMemoryQueueBackedFhirClientBalpSink
public AsyncMemoryQueueBackedFhirClientBalpSink(@Nonnull ca.uhn.fhir.context.FhirContext theFhirContext, @Nonnull String theTargetBaseUrl, @Nullable List<Object> theClientInterceptors) Sets the FhirContext to use when initiating outgoing connections- Parameters:
theFhirContext
- The FhirContext instance. This context must be for the FHIR Version supported by the target/sink server (as opposed to the FHIR Version supported by the audit source).theTargetBaseUrl
- The FHIR server base URL for the target/sink server to receive audit events.theClientInterceptors
- An optional list of interceptors to register against the client. May be null.
-
AsyncMemoryQueueBackedFhirClientBalpSink
public AsyncMemoryQueueBackedFhirClientBalpSink(ca.uhn.fhir.rest.client.api.IGenericClient theClient) Constructor- Parameters:
theClient
- The FHIR client to use as a sink.
-
-
Method Details
-
recordAuditEvent
- Overrides:
recordAuditEvent
in classFhirClientBalpSink
-
stop
-