Package ca.uhn.fhir.rest.client.apache
Class ApacheHttpResponse
- java.lang.Object
-
- ca.uhn.fhir.rest.client.impl.BaseHttpResponse
-
- ca.uhn.fhir.rest.client.apache.ApacheHttpResponse
-
- All Implemented Interfaces:
ca.uhn.fhir.rest.client.api.IHttpResponse
public class ApacheHttpResponse extends BaseHttpResponse implements ca.uhn.fhir.rest.client.api.IHttpResponse
A Http Response based on Apache. This is an adapter around the classHttpResponse- Author:
- Peter Van Houte | peter.vanhoute@agfa.com | Agfa Healthcare
-
-
Constructor Summary
Constructors Constructor Description ApacheHttpResponse(org.apache.http.HttpResponse theResponse, ca.uhn.fhir.util.StopWatch theResponseStopWatch)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbufferEntity()voidclose()ReadercreateReader()Map<String,List<String>>getAllHeaders()List<String>getHeaders(String theName)StringgetMimeType()org.apache.http.HttpResponsegetResponse()intgetStatus()StringgetStatusInfo()InputStreamreadEntity()-
Methods inherited from class ca.uhn.fhir.rest.client.impl.BaseHttpResponse
getRequestStopWatch
-
-
-
-
Constructor Detail
-
ApacheHttpResponse
public ApacheHttpResponse(org.apache.http.HttpResponse theResponse, ca.uhn.fhir.util.StopWatch theResponseStopWatch)
-
-
Method Detail
-
bufferEntity
public void bufferEntity() throws IOException
- Specified by:
bufferEntityin interfaceca.uhn.fhir.rest.client.api.IHttpResponse- Throws:
IOException
-
close
public void close()
- Specified by:
closein interfaceca.uhn.fhir.rest.client.api.IHttpResponse
-
createReader
public Reader createReader() throws IOException
- Specified by:
createReaderin interfaceca.uhn.fhir.rest.client.api.IHttpResponse- Throws:
IOException
-
getAllHeaders
public Map<String,List<String>> getAllHeaders()
- Specified by:
getAllHeadersin interfaceca.uhn.fhir.rest.client.api.IHttpResponse
-
getHeaders
public List<String> getHeaders(String theName)
- Specified by:
getHeadersin interfaceca.uhn.fhir.rest.client.api.IHttpResponse
-
getMimeType
public String getMimeType()
- Specified by:
getMimeTypein interfaceca.uhn.fhir.rest.client.api.IHttpResponse
-
getResponse
public org.apache.http.HttpResponse getResponse()
- Specified by:
getResponsein interfaceca.uhn.fhir.rest.client.api.IHttpResponse
-
getStatus
public int getStatus()
- Specified by:
getStatusin interfaceca.uhn.fhir.rest.client.api.IHttpResponse
-
getStatusInfo
public String getStatusInfo()
- Specified by:
getStatusInfoin interfaceca.uhn.fhir.rest.client.api.IHttpResponse
-
readEntity
public InputStream readEntity() throws IOException
- Specified by:
readEntityin interfaceca.uhn.fhir.rest.client.api.IHttpResponse- Throws:
IOException
-
-