public class HttpClientResponseImpl extends HttpResponseImpl implements HttpClientResponse
HttpClientResponse
interface.HeaderFieldsAccessor.HeaderFieldsBuilder<T extends HeaderFields<?,?>,B extends HeaderFieldsAccessor.HeaderFieldsBuilder<T,B>>, HeaderFieldsAccessor.HeaderFieldsMutator<T extends HeaderFields<?,?>>, HeaderFieldsAccessor.HeaderFieldsProperty<T extends HeaderFields<?,?>>
HttpStatusCodeAccessor.HttpStatusCodeBuilder<B extends HttpStatusCodeAccessor.HttpStatusCodeBuilder<B>>, HttpStatusCodeAccessor.HttpStatusCodeMutator, HttpStatusCodeAccessor.HttpStatusCodeProperty
HttpBodyAccessor.HttpBodyBuilder<B extends HttpBodyAccessor.HttpBodyBuilder<B>>, HttpBodyAccessor.HttpBodyMutator, HttpBodyAccessor.HttpBodyProperty, HttpBodyAccessor.HttpBodyProvider<EXC extends Exception>
HttpInputStreamAccessor.HttpInputStreamBuilder<B extends HttpInputStreamAccessor.HttpInputStreamBuilder<B>>, HttpInputStreamAccessor.HttpInputStreamMutator, HttpInputStreamAccessor.HttpInputStreamProperty, HttpInputStreamAccessor.HttpInputStreamProvider<EXC extends Exception>
Modifier and Type | Field and Description |
---|---|
protected MediaTypeFactoryLookup |
_mediaTypeFactoryLookup |
_httpStatusCode
Constructor and Description |
---|
HttpClientResponseImpl(HttpStatusCode aHttpStatusCode,
ResponseHeaderFields aHeaderFields,
InputStream aHttpInputStream,
MediaTypeFactoryLookup aMediaTypeFactoryLookup)
Constructs a
HttpClientResponse with all required attributes. |
Modifier and Type | Method and Description |
---|---|
String |
getHttpBody()
Retrieves the HTTP body from the HTTP body property.
|
InputStream |
getHttpInputStream()
Retrieves the
InputStream from the HTTP InputStream
property. |
<RES> RES |
getResponse(Class<RES> aResponseType)
This method's implementation supports the
HttpBodyMap to
unmarshal an HTTP Response-Body into an HttpBodyMap when
providing the HttpBodyMap as response type. |
getHeaderFields, getHttpStatusCode
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getResponse
getHeaderFields
getHttpStatusCode
protected MediaTypeFactoryLookup _mediaTypeFactoryLookup
public HttpClientResponseImpl(HttpStatusCode aHttpStatusCode, ResponseHeaderFields aHeaderFields, InputStream aHttpInputStream, MediaTypeFactoryLookup aMediaTypeFactoryLookup)
HttpClientResponse
with all required attributes.aHttpStatusCode
- The HttpStatusCode
of the response.aHeaderFields
- The ResponseHeaderFields
sent by the
response.aHttpInputStream
- The InputStream
representing the
request's HTTP body.aMediaTypeFactoryLookup
- The lookup factory for retrieving the
required MediaType
factories.public <RES> RES getResponse(Class<RES> aResponseType) throws BadResponseException
HttpBodyMap
to
unmarshal an HTTP Response-Body into an HttpBodyMap
when
providing the HttpBodyMap
as response type.getResponse
in interface HttpClientResponse
RES
- the generic typeaResponseType
- the a response typeBadResponseException
- the bad response exceptionpublic InputStream getHttpInputStream()
InputStream
from the HTTP InputStream
property.getHttpInputStream
in interface HttpInputStreamAccessor
InputStream
stored by the InputStream
property.public String getHttpBody()
getHttpBody
in interface HttpBodyAccessor
Copyright © 2018. All rights reserved.