Class EagerBundleProvider

java.lang.Object
org.openehealth.ipf.commons.ihe.fhir.AbstractBundleProvider
org.openehealth.ipf.commons.ihe.fhir.EagerBundleProvider
All Implemented Interfaces:
IBundleProvider

public class EagerBundleProvider extends AbstractBundleProvider
Simple Bundle provider that fetches ALL results and caches them as soon as one of size() or getResources(int, int) is called.

Note: instances of this class is neither thread-safe nor can they be reused across requests

  • Constructor Details

    • EagerBundleProvider

      public EagerBundleProvider(RequestConsumer consumer, Object payload, Map<String,Object> headers, jakarta.servlet.http.HttpServletResponse httpServletResponse)
    • EagerBundleProvider

      public EagerBundleProvider(RequestConsumer consumer, boolean sort, Object payload, Map<String,Object> headers, jakarta.servlet.http.HttpServletResponse httpServletResponse)
  • Method Details

    • getResources

      @NonNull public @NonNull List<IBaseResource> getResources(int fromIndex, int toIndex)
    • size

      public Integer size()