Class RequestHeaderPartitionInterceptor

java.lang.Object
ca.uhn.fhir.jpa.interceptor.RequestHeaderPartitionInterceptor

This is an interceptor to identify the partition ID from a request header. It reads the value of the X-Request-Partition-IDs header, which is expected to be a comma separated partition ids. For the read operations it uses all the partitions specified in the header. The create operations it uses the first partition ID from the header. The tests for the functionality of this interceptor can be found in the ca.uhn.fhir.jpa.interceptor.RequestHeaderPartitionTest class.
  • Field Details

  • Constructor Details

  • Method Details

    • identifyPartitionForCreate

      public RequestPartitionId identifyPartitionForCreate(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)
      This method is called to identify the partition ID for create operations. It reads the value of the X-Request-Partition-IDs header, and parses and returns the first partition ID from the header value.
    • identifyPartitionForRead

      public RequestPartitionId identifyPartitionForRead(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)
      This method is called to identify the partition ID for read operations. Parses all the partition IDs from the header into a RequestPartitionId object.