Class IpfFhirStreamingUploadAutoConfiguration

java.lang.Object
org.openehealth.ipf.boot.fhir.IpfFhirStreamingUploadAutoConfiguration

@Configuration @ConditionalOnWebApplication @ConditionalOnProperty(prefix="ipf.fhir.streaming-upload", name="enabled") @AutoConfigureAfter(IpfFhirAutoConfiguration.class) @EnableConfigurationProperties(IpfFhirConfigurationProperties.class) public class IpfFhirStreamingUploadAutoConfiguration extends Object
Registers the Base64SplittingFilter, which streams the document content of a large FHIR upload past the FHIR parser instead of letting it materialize on the heap.

This is the runtime half of the bridge to the split: the split itself knows nothing about Spring, about configuration properties or about metrics, so everything it needs is assembled here. Two pieces of that are deployment specific and can be contributed as beans:

  • a StreamedDocumentListener, to meter the split - the filter answers to it without having to know about any particular metrics library
  • a UnaryOperator<String> named STREAMING_UPLOAD_DIAGNOSTICS_POLICY, applied to the diagnostics of a rejection before it is sent. The filter answers a rejected upload itself and therefore bypasses whatever the FHIR servlet's interceptors would have applied, so an application that does not disclose error details to its clients has to redact them here as well.
The filter is off unless ipf.fhir.streaming-upload.enabled is set; when off, it is not registered at all.
Author:
Christian Ohr
See Also: