Package org.refcodes.net
Interface HttpClientResponse
-
- All Superinterfaces:
HeaderFieldsAccessor<ResponseHeaderFields>
,HttpBodyAccessor
,HttpInputStreamAccessor
,HttpResponse
,HttpStatusCodeAccessor
- All Known Implementing Classes:
HttpClientResponseImpl
public interface HttpClientResponse extends HttpResponse, HttpBodyAccessor, HttpInputStreamAccessor
Defines aHttpClientResponse
being the response as consumed by the client.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.net.HeaderFieldsAccessor
HeaderFieldsAccessor.HeaderFieldsBuilder<T extends HeaderFields<?,?>,B extends HeaderFieldsAccessor.HeaderFieldsBuilder<T,B>>, HeaderFieldsAccessor.HeaderFieldsMutator<T extends HeaderFields<?,?>>, HeaderFieldsAccessor.HeaderFieldsProperty<T extends HeaderFields<?,?>>
-
Nested classes/interfaces inherited from interface org.refcodes.net.HttpBodyAccessor
HttpBodyAccessor.HttpBodyBuilder<B extends HttpBodyAccessor.HttpBodyBuilder<B>>, HttpBodyAccessor.HttpBodyMutator, HttpBodyAccessor.HttpBodyProperty, HttpBodyAccessor.HttpBodyProvider<EXC extends java.lang.Exception>
-
Nested classes/interfaces inherited from interface org.refcodes.net.HttpInputStreamAccessor
HttpInputStreamAccessor.HttpInputStreamBuilder<B extends HttpInputStreamAccessor.HttpInputStreamBuilder<B>>, HttpInputStreamAccessor.HttpInputStreamMutator, HttpInputStreamAccessor.HttpInputStreamProperty, HttpInputStreamAccessor.HttpInputStreamProvider<EXC extends java.lang.Exception>
-
Nested classes/interfaces inherited from interface org.refcodes.net.HttpStatusCodeAccessor
HttpStatusCodeAccessor.HttpStatusCodeBuilder<B extends HttpStatusCodeAccessor.HttpStatusCodeBuilder<B>>, HttpStatusCodeAccessor.HttpStatusCodeMutator, HttpStatusCodeAccessor.HttpStatusCodeProperty
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default HttpBodyMap
getResponse()
Retrieves theHttpBodyMap
representing the response body.<RES> RES
getResponse(java.lang.Class<RES> aResponseType)
Retrieves the object representing the response body.-
Methods inherited from interface org.refcodes.net.HeaderFieldsAccessor
getHeaderFields
-
Methods inherited from interface org.refcodes.net.HttpBodyAccessor
getHttpBody
-
Methods inherited from interface org.refcodes.net.HttpInputStreamAccessor
getHttpInputStream
-
Methods inherited from interface org.refcodes.net.HttpStatusCodeAccessor
getHttpStatusCode
-
-
-
-
Method Detail
-
getResponse
<RES> RES getResponse(java.lang.Class<RES> aResponseType) throws BadResponseException
Retrieves the object representing the response body. TheHttpClientResponseImpl.getResponse(Class)
implementation supports theHttpBodyMap
to unmarshal an HTTP Response-Body into anHttpBodyMap
when providing theHttpBodyMap
as response type.- Type Parameters:
RES
- the generic type- Parameters:
aResponseType
- The type of which the response is expected to be.- Returns:
- An instance of the type representing the response.
- Throws:
BadResponseException
- thrown when unmarshaling / deserializing an object fails.
-
getResponse
default HttpBodyMap getResponse() throws BadResponseException
Retrieves theHttpBodyMap
representing the response body.- Returns:
- An instance of the
HttpBodyMap
representing the response. - Throws:
BadResponseException
- thrown when unmarshaling / deserializing an object fails.
-
-