Interface FhirRegistry
- All Known Implementing Classes:
DefaultFhirRegistry
public interface FhirRegistry
Keeps track of
RequestConsumer and IpfFhirServlet and connects them to each other.- Since:
- 3.2
- Author:
- Christian Ohr
-
Method Summary
Modifier and TypeMethodDescriptionbooleanhasServlet(String servletName) Returns true if there is already a registered FHIR servlet with the provided namevoidregister(RestfulServer servlet) Registers the FHIR servlet, usually during its init phase.voidRegisters the FHIR resource provider.default FhirProviderresolveProvider(FhirProvider candidate) Returns the resource provider instance to be used for the servlet(s) of this registry.voidunregister(RestfulServer servlet) Unregisters the FHIR servlet, usually during its destroy phasevoidunregister(Object resourceProvider) Unregisters the FHIR resource provider.
-
Method Details
-
register
Registers the FHIR resource provider.- Parameters:
resourceProvider- resource provider
-
unregister
Unregisters the FHIR resource provider.- Parameters:
resourceProvider- resource provider
-
resolveProvider
Returns the resource provider instance to be used for the servlet(s) of this registry. All endpoints that resolve a provider of the same class get the same instance, so that e.g. aSharedFhirProvideris shared between endpoints of the same servlet, but not between different servlets.The default implementation returns the candidate itself.
- Parameters:
candidate- new resource provider instance, used if this registry does not yet know an instance of the same class- Returns:
- the resource provider instance to be connected and registered
- Since:
- 6.1
-
register
Registers the FHIR servlet, usually during its init phase.- Parameters:
servlet- FHIR servlet
-
unregister
Unregisters the FHIR servlet, usually during its destroy phase- Parameters:
servlet- FHIR servlet
-
hasServlet
Returns true if there is already a registered FHIR servlet with the provided name- Parameters:
servletName- name of the servlet- Returns:
- true if there is already a registered FHIR servlet with this name
-