public abstract class BaseClient extends Object implements IRestfulClient
| Modifier and Type | Class and Description |
|---|---|
protected class |
BaseClient.ResourceResponseHandler<T extends IBaseResource> |
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,List<String>> |
createExtraParams() |
static Reader |
createReaderFromResponse(org.apache.http.HttpResponse theResponse) |
<T extends IBaseResource> |
fetchResourceFromUrl(Class<T> theResourceType,
String theUrl)
Retrieve the contents at the given URL and parse them as a resource.
|
EncodingEnum |
getEncoding()
Returns the encoding that will be used on requests.
|
org.apache.http.client.HttpClient |
getHttpClient()
Do not call this method in client code.
|
List<IClientInterceptor> |
getInterceptors() |
org.apache.http.HttpResponse |
getLastResponse()
For now, this is a part of the internal API of HAPI - Use with caution as this method may change!
|
String |
getLastResponseBody()
For now, this is a part of the internal API of HAPI - Use with caution as this method may change!
|
Boolean |
getPrettyPrint()
Returns the pretty print flag, which is a request to the server for it to return "pretty printed" responses.
|
String |
getServerBase()
Base URL for the server, with no trailing "/"
|
SummaryEnum |
getSummary() |
String |
getUrlBase() |
boolean |
isKeepResponses()
For now, this is a part of the internal API of HAPI - Use with caution as this method may change!
|
boolean |
isPrettyPrint()
Returns the pretty print flag, which is a request to the server for it to return "pretty printed" responses.
|
void |
registerInterceptor(IClientInterceptor theInterceptor)
Register a new interceptor for this client.
|
void |
setDontValidateConformance(boolean theDontValidateConformance)
This method is an internal part of the HAPI API and may change, use with caution.
|
void |
setEncoding(EncodingEnum theEncoding)
Sets the encoding that will be used on requests.
|
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 |
setLastResponse(org.apache.http.HttpResponse theLastResponse)
For now, this is a part of the internal API of HAPI - Use with caution as this method may change!
|
void |
setLastResponseBody(String theLastResponseBody)
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(SummaryEnum theSummary)
If not set to
null, specifies a value for the _summary parameter
to be applied globally on this client. |
void |
unregisterInterceptor(IClientInterceptor theInterceptor)
Remove an intercaptor that was previously registered using
IRestfulClient.registerInterceptor(IClientInterceptor) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFhirContextprotected Map<String,List<String>> createExtraParams()
public EncodingEnum getEncoding()
null, which means the client will not
explicitly request an encoding. (This is standard behaviour according to the FHIR specification)public org.apache.http.client.HttpClient getHttpClient()
getHttpClient in interface IRestfulClientpublic List<IClientInterceptor> getInterceptors()
public org.apache.http.HttpResponse getLastResponse()
public String getLastResponseBody()
public Boolean getPrettyPrint()
public String getServerBase()
getServerBase in interface IRestfulClientpublic SummaryEnum getSummary()
public String getUrlBase()
public boolean isKeepResponses()
public boolean isPrettyPrint()
public void registerInterceptor(IClientInterceptor theInterceptor)
IRestfulClientregisterInterceptor in interface IRestfulClientpublic void setDontValidateConformance(boolean theDontValidateConformance)
IRestfulClientFactory.setServerValidationModeEnum(ServerValidationModeEnum)public void setEncoding(EncodingEnum theEncoding)
null, 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)setEncoding in interface IRestfulClienttheEncoding - The encoding to use in the request, or null not specify
an encoding (which generally implies the use of XML). The default is null.public void setKeepResponses(boolean theKeepResponses)
public void setLastResponse(org.apache.http.HttpResponse theLastResponse)
public void setLastResponseBody(String theLastResponseBody)
public void setPrettyPrint(Boolean thePrettyPrint)
setPrettyPrint in interface IRestfulClientthePrettyPrint - The pretty print flag to use in the request (default is false)public void setSummary(SummaryEnum theSummary)
IRestfulClientnull, specifies a value for the _summary parameter
to be applied globally on this client.setSummary in interface IRestfulClientpublic void unregisterInterceptor(IClientInterceptor theInterceptor)
IRestfulClientIRestfulClient.registerInterceptor(IClientInterceptor)unregisterInterceptor in interface IRestfulClientpublic static Reader createReaderFromResponse(org.apache.http.HttpResponse theResponse) throws IllegalStateException, IOException
IllegalStateExceptionIOExceptionpublic <T extends IBaseResource> T fetchResourceFromUrl(Class<T> theResourceType, String theUrl)
IRestfulClientfetchResourceFromUrl in interface IRestfulClienttheResourceType - The resource type to parsetheUrl - The URL to loadCopyright © 2014–2016 University Health Network. All rights reserved.