public class LazyBundleProvider extends AbstractBundleProvider
RequestConsumer
on request:
Constants.FHIR_REQUEST_SIZE_ONLY
, and the response is expected to populate this
header with the result size as integer value. The size is cached for further attempts to request the sizeConstants.FHIR_FROM_INDEX
and Constants.FHIR_TO_INDEX
, respectively. The response is
expected to contain this result subset.
Note: instances of this class is neither thread-safe nor can they be reused across requests
Constructor and Description |
---|
LazyBundleProvider(RequestConsumer consumer,
boolean cacheResults,
Object payload,
Map<String,Object> headers)
Initializes a lazy bundle provider
|
Modifier and Type | Method and Description |
---|---|
List<org.hl7.fhir.instance.model.api.IBaseResource> |
getResources(int fromIndex,
int toIndex) |
Integer |
size() |
getConsumer, getHeaders, getPayload, getPublished, getUuid, obtainResources, preferredPageSize
public LazyBundleProvider(RequestConsumer consumer, boolean cacheResults, Object payload, Map<String,Object> headers)
consumer
- FHIR consumer that uses ths providercacheResults
- cache results. So far, only the result set size is cachedpayload
- incoming payloadheaders
- incoming headersCopyright © 2018 Open eHealth Foundation. All rights reserved.