
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
Nested ClassesModifier and TypeClassDescriptionprotected final classprotected classBaseClient.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.EncodingEnumca.uhn.fhir.rest.client.api.IHttpClientca.uhn.fhir.interceptor.api.IInterceptorServiceca.uhn.fhir.rest.client.api.IHttpResponseFor 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.SummaryEnumprotected <T> TinvokeClient(ca.uhn.fhir.context.FhirContext theContext, IClientResponseHandler<T> binding, BaseHttpClientInvocation clientInvocation) protected <T> TinvokeClient(ca.uhn.fhir.context.FhirContext theContext, IClientResponseHandler<T> binding, BaseHttpClientInvocation clientInvocation, boolean theLogRequestAndResponse) protected <T> TinvokeClient(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) booleanFor now, this is a part of the internal API of HAPI - Use with caution as this method may change!booleanReturns the pretty print flag, which is a request to the server for it to return "pretty printed" responses.voidregisterInterceptor(Object theInterceptor) voidsetDontValidateConformance(boolean theDontValidateConformance) This method is an internal part of the HAPI API and may change, use with caution.voidsetEncoding(ca.uhn.fhir.rest.api.EncodingEnum theEncoding) Sets the encoding that will be used on requests.voidsetFormatParamStyle(ca.uhn.fhir.rest.api.RequestFormatParamStyleEnum theRequestFormatParamStyle) voidsetInterceptorService(ca.uhn.fhir.interceptor.api.IInterceptorService theInterceptorService) voidsetKeepResponses(boolean theKeepResponses) For now, this is a part of the internal API of HAPI - Use with caution as this method may change!voidsetPrettyPrint(Boolean thePrettyPrint) Sets the pretty print flag, which is a request to the server for it to return "pretty printed" responses.voidsetSummary(ca.uhn.fhir.rest.api.SummaryEnum theSummary) voidunregisterInterceptor(Object theInterceptor) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ca.uhn.fhir.rest.client.api.IRestfulClient
getFhirContext
-
Method Details
-
getInterceptorService
- Specified by:
getInterceptorServicein interfaceca.uhn.fhir.rest.client.api.IRestfulClient
-
setInterceptorService
public void setInterceptorService(@Nonnull ca.uhn.fhir.interceptor.api.IInterceptorService theInterceptorService) - Specified by:
setInterceptorServicein 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:
fetchResourceFromUrlin interfaceca.uhn.fhir.rest.client.api.IRestfulClient
-
getEncoding
- Specified by:
getEncodingin 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:
setEncodingin interfaceca.uhn.fhir.rest.client.api.IRestfulClient
-
getHttpClient
- Specified by:
getHttpClientin 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:
getServerBasein interfaceca.uhn.fhir.rest.client.api.IRestfulClient
-
getSummary
-
setSummary
- Specified by:
setSummaryin interfaceca.uhn.fhir.rest.client.api.IRestfulClient
-
getUrlBase
-
setFormatParamStyle
public void setFormatParamStyle(ca.uhn.fhir.rest.api.RequestFormatParamStyleEnum theRequestFormatParamStyle) - Specified by:
setFormatParamStylein 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:
setPrettyPrintin interfaceca.uhn.fhir.rest.client.api.IRestfulClient
-
registerInterceptor
- Specified by:
registerInterceptorin 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:
unregisterInterceptorin interfaceca.uhn.fhir.rest.client.api.IRestfulClient
-