Package ca.uhn.fhir.rest.client.impl
Class BaseClient
java.lang.Object
ca.uhn.fhir.rest.client.impl.BaseClient
- All Implemented Interfaces:
ca.uhn.fhir.rest.client.api.IRestfulClient
- Direct Known Subclasses:
ClientInvocationHandler
,GenericClient
public abstract class BaseClient
extends Object
implements ca.uhn.fhir.rest.client.api.IRestfulClient
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected final class
protected class
BaseClient.ResourceResponseHandler<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
Method Summary
Modifier and TypeMethodDescriptioncreateExtraParams
(String theCustomAcceptHeader) <T extends org.hl7.fhir.instance.model.api.IBaseResource>
TfetchResourceFromUrl
(Class<T> theResourceType, String theUrl) ca.uhn.fhir.rest.api.EncodingEnum
ca.uhn.fhir.rest.client.api.IHttpClient
ca.uhn.fhir.interceptor.api.IInterceptorService
ca.uhn.fhir.rest.client.api.IHttpResponse
For now, this is a part of the internal API of HAPI - Use with caution as this method may change!For now, this is a part of the internal API of HAPI - Use with caution as this method may change!ca.uhn.fhir.rest.api.SummaryEnum
protected <T> T
invokeClient
(ca.uhn.fhir.context.FhirContext theContext, IClientResponseHandler<T> binding, BaseHttpClientInvocation clientInvocation) protected <T> T
invokeClient
(ca.uhn.fhir.context.FhirContext theContext, IClientResponseHandler<T> binding, BaseHttpClientInvocation clientInvocation, boolean theLogRequestAndResponse) protected <T> T
invokeClient
(ca.uhn.fhir.context.FhirContext theContext, IClientResponseHandler<T> binding, BaseHttpClientInvocation clientInvocation, ca.uhn.fhir.rest.api.EncodingEnum theEncoding, Boolean thePrettyPrint, boolean theLogRequestAndResponse, ca.uhn.fhir.rest.api.SummaryEnum theSummaryMode, Set<String> theSubsetElements, ca.uhn.fhir.rest.api.CacheControlDirective theCacheControlDirective, String theCustomAcceptHeader, Map<String, List<String>> theCustomHeaders) boolean
For now, this is a part of the internal API of HAPI - Use with caution as this method may change!boolean
Returns the pretty print flag, which is a request to the server for it to return "pretty printed" responses.void
registerInterceptor
(Object theInterceptor) void
setDontValidateConformance
(boolean theDontValidateConformance) This method is an internal part of the HAPI API and may change, use with caution.void
setEncoding
(ca.uhn.fhir.rest.api.EncodingEnum theEncoding) Sets the encoding that will be used on requests.void
setFormatParamStyle
(ca.uhn.fhir.rest.api.RequestFormatParamStyleEnum theRequestFormatParamStyle) void
setInterceptorService
(ca.uhn.fhir.interceptor.api.IInterceptorService theInterceptorService) void
setKeepResponses
(boolean theKeepResponses) For now, this is a part of the internal API of HAPI - Use with caution as this method may change!void
setPrettyPrint
(Boolean thePrettyPrint) Sets the pretty print flag, which is a request to the server for it to return "pretty printed" responses.void
setSummary
(ca.uhn.fhir.rest.api.SummaryEnum theSummary) void
unregisterInterceptor
(Object theInterceptor) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ca.uhn.fhir.rest.client.api.IRestfulClient
getFhirContext
-
Method Details
-
getInterceptorService
- Specified by:
getInterceptorService
in interfaceca.uhn.fhir.rest.client.api.IRestfulClient
-
setInterceptorService
public void setInterceptorService(@Nonnull ca.uhn.fhir.interceptor.api.IInterceptorService theInterceptorService) - Specified by:
setInterceptorService
in interfaceca.uhn.fhir.rest.client.api.IRestfulClient
-
createExtraParams
-
fetchResourceFromUrl
public <T extends org.hl7.fhir.instance.model.api.IBaseResource> T fetchResourceFromUrl(Class<T> theResourceType, String theUrl) - Specified by:
fetchResourceFromUrl
in interfaceca.uhn.fhir.rest.client.api.IRestfulClient
-
getEncoding
- Specified by:
getEncoding
in interfaceca.uhn.fhir.rest.client.api.IRestfulClient
-
setEncoding
Sets the encoding that will be used on requests. Default isnull
, which means the client will not explicitly request an encoding. (This is perfectly acceptable behaviour according to the FHIR specification. In this case, the server will choose which encoding to return, and the client can handle either XML or JSON)- Specified by:
setEncoding
in interfaceca.uhn.fhir.rest.client.api.IRestfulClient
-
getHttpClient
- Specified by:
getHttpClient
in interfaceca.uhn.fhir.rest.client.api.IRestfulClient
-
getLastResponse
For now, this is a part of the internal API of HAPI - Use with caution as this method may change! -
getLastResponseBody
For now, this is a part of the internal API of HAPI - Use with caution as this method may change! -
getServerBase
- Specified by:
getServerBase
in interfaceca.uhn.fhir.rest.client.api.IRestfulClient
-
getSummary
-
setSummary
- Specified by:
setSummary
in interfaceca.uhn.fhir.rest.client.api.IRestfulClient
-
getUrlBase
-
setFormatParamStyle
public void setFormatParamStyle(ca.uhn.fhir.rest.api.RequestFormatParamStyleEnum theRequestFormatParamStyle) - Specified by:
setFormatParamStyle
in interfaceca.uhn.fhir.rest.client.api.IRestfulClient
-
invokeClient
protected <T> T invokeClient(ca.uhn.fhir.context.FhirContext theContext, IClientResponseHandler<T> binding, BaseHttpClientInvocation clientInvocation) -
invokeClient
protected <T> T invokeClient(ca.uhn.fhir.context.FhirContext theContext, IClientResponseHandler<T> binding, BaseHttpClientInvocation clientInvocation, boolean theLogRequestAndResponse) -
invokeClient
protected <T> T invokeClient(ca.uhn.fhir.context.FhirContext theContext, IClientResponseHandler<T> binding, BaseHttpClientInvocation clientInvocation, ca.uhn.fhir.rest.api.EncodingEnum theEncoding, Boolean thePrettyPrint, boolean theLogRequestAndResponse, ca.uhn.fhir.rest.api.SummaryEnum theSummaryMode, Set<String> theSubsetElements, ca.uhn.fhir.rest.api.CacheControlDirective theCacheControlDirective, String theCustomAcceptHeader, Map<String, List<String>> theCustomHeaders) -
isKeepResponses
For now, this is a part of the internal API of HAPI - Use with caution as this method may change! -
setKeepResponses
For now, this is a part of the internal API of HAPI - Use with caution as this method may change! -
isPrettyPrint
Returns the pretty print flag, which is a request to the server for it to return "pretty printed" responses. Note that this is currently a non-standard flag (_pretty) which is supported only by HAPI based servers (and any other servers which might implement it). -
setPrettyPrint
Sets the pretty print flag, which is a request to the server for it to return "pretty printed" responses. Note that this is currently a non-standard flag (_pretty) which is supported only by HAPI based servers (and any other servers which might implement it).- Specified by:
setPrettyPrint
in interfaceca.uhn.fhir.rest.client.api.IRestfulClient
-
registerInterceptor
- Specified by:
registerInterceptor
in interfaceca.uhn.fhir.rest.client.api.IRestfulClient
-
setDontValidateConformance
This method is an internal part of the HAPI API and may change, use with caution. If you want to disable the loading of conformance statements, useIRestfulClientFactory.setServerValidationMode(ServerValidationModeEnum)
-
unregisterInterceptor
- Specified by:
unregisterInterceptor
in interfaceca.uhn.fhir.rest.client.api.IRestfulClient
-