T
- The type of the default response content.public class HttpClientResponse<T> extends AbstractHttpContentHolder<T>
HttpClient
. Observable
as returned by AbstractHttpContentHolder.getContent()
supports one and only one subscriber.AbstractHttpContentHolder.ignoreContent()
or have atleast one subscription to AbstractHttpContentHolder.getContent()
AbstractHttpContentHolder.getContent()
after the configured timeout, will result in error on the subscriber.Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_CONTENT_SUBSCRIPTION_TIMEOUT_MS |
static java.lang.String |
KEEP_ALIVE_HEADER_NAME |
static java.lang.String |
KEEP_ALIVE_TIMEOUT_HEADER_ATTR |
content
Constructor and Description |
---|
HttpClientResponse(io.netty.handler.codec.http.HttpResponse nettyResponse,
UnicastContentSubject<T> content) |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.util.Set<io.netty.handler.codec.http.Cookie>> |
getCookies() |
HttpResponseHeaders |
getHeaders() |
io.netty.handler.codec.http.HttpVersion |
getHttpVersion() |
java.lang.Long |
getKeepAliveTimeoutSeconds()
Parses the timeout value from the HTTP keep alive header (with name
KEEP_ALIVE_HEADER_NAME ) as described in
this spec |
io.netty.handler.codec.http.HttpResponseStatus |
getStatus() |
getContent, ignoreContent
public static final long DEFAULT_CONTENT_SUBSCRIPTION_TIMEOUT_MS
public static final java.lang.String KEEP_ALIVE_HEADER_NAME
public static final java.lang.String KEEP_ALIVE_TIMEOUT_HEADER_ATTR
public HttpClientResponse(io.netty.handler.codec.http.HttpResponse nettyResponse, UnicastContentSubject<T> content)
public HttpResponseHeaders getHeaders()
public io.netty.handler.codec.http.HttpVersion getHttpVersion()
public io.netty.handler.codec.http.HttpResponseStatus getStatus()
public java.util.Map<java.lang.String,java.util.Set<io.netty.handler.codec.http.Cookie>> getCookies()
public java.lang.Long getKeepAliveTimeoutSeconds()
KEEP_ALIVE_HEADER_NAME
) as described in
this specnull
if this response does not define the appropriate header value.