B
- The response type@Internal public class FullNettyClientHttpResponse<B> extends java.lang.Object implements HttpResponse<B>, Completable, NettyHttpResponseBuilder
FullHttpResponse
for consumption by the HttpClient
.Modifier and Type | Method and Description |
---|---|
MutableConvertibleValues<java.lang.Object> |
getAttributes()
A
MutableConvertibleValues of the attributes for this HTTP message. |
java.util.Optional<B> |
getBody() |
<T> java.util.Optional<T> |
getBody(Argument<T> type)
Return the body as the given type.
|
<T> java.util.Optional<T> |
getBody(java.lang.Class<T> type)
Return the body as the given type.
|
HttpHeaders |
getHeaders() |
io.netty.handler.codec.http.FullHttpResponse |
getNativeResponse() |
HttpStatus |
getStatus() |
boolean |
isStream() |
void |
onComplete()
* Successful terminal state.
|
java.lang.String |
reason() |
io.netty.handler.codec.http.FullHttpResponse |
toFullHttpResponse()
Converts this object to a full http response.
|
io.netty.handler.codec.http.HttpResponse |
toHttpResponse()
Converts this object to the most appropriate http response type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
accepted, accepted, badRequest, badRequest, body, code, created, created, created, header, noContent, notAllowed, notAllowed, notAllowedGeneric, notFound, notFound, notModified, ok, ok, permanentRedirect, redirect, seeOther, serverError, serverError, setAttribute, status, status, status, temporaryRedirect, unauthorized, unprocessableEntity, uri
getCharacterEncoding, getContentLength, getContentType, getLocale
removeAttribute
getAttribute, getAttribute
toHttpResponse, toStreamHttpResponse, toStreamResponse
public java.lang.String reason()
reason
in interface HttpResponse<B>
public HttpStatus getStatus()
getStatus
in interface HttpResponse<B>
public HttpHeaders getHeaders()
getHeaders
in interface HttpMessage<B>
HttpHeaders
objectpublic MutableConvertibleValues<java.lang.Object> getAttributes()
HttpMessage
A MutableConvertibleValues
of the attributes for this HTTP message.
Attributes are designed for internal data sharing and hence are isolated from headers and parameters which are client supplied
getAttributes
in interface AttributeHolder
getAttributes
in interface MutableAttributeHolder
getAttributes
in interface HttpMessage<B>
public java.util.Optional<B> getBody()
getBody
in interface HttpMessage<B>
public <T> java.util.Optional<T> getBody(java.lang.Class<T> type)
HttpMessage
getBody
in interface HttpMessage<B>
T
- The generic typetype
- The type of the bodyOptional
of the type or Optional.empty()
if the body cannot be returned as the given typepublic io.netty.handler.codec.http.FullHttpResponse getNativeResponse()
public <T> java.util.Optional<T> getBody(Argument<T> type)
HttpMessage
getBody
in interface HttpMessage<B>
T
- The generic typetype
- The type of the bodyOptional
of the type or Optional.empty()
if the body cannot be returned as the given typepublic void onComplete()
Completable
onComplete
in interface Completable
Subscriber.onComplete()
@NonNull public io.netty.handler.codec.http.FullHttpResponse toFullHttpResponse()
NettyHttpResponseBuilder
toFullHttpResponse
in interface NettyHttpResponseBuilder
@NonNull public io.netty.handler.codec.http.HttpResponse toHttpResponse()
NettyHttpResponseBuilder
toHttpResponse
in interface NettyHttpResponseBuilder
public boolean isStream()
isStream
in interface NettyHttpResponseBuilder