Top Description Fields Constructors Methods
reactor.netty.http.client

pack-priv final Class FailedHttpClientRequest

extends Object
implements HttpClientRequest
Class Inheritance
All Implemented Interfaces
reactor.netty.http.client.HttpClientRequest, reactor.netty.http.client.HttpClientInfos, reactor.netty.http.HttpInfos
Imports
io.netty.handler.codec.http.HttpHeaderNames, .HttpHeaderValues, .HttpHeaders, .HttpMethod, .HttpVersion, io.netty.handler.codec.http.cookie.ClientCookieDecoder, .Cookie, reactor.netty.http.Cookies, .HttpOperations, reactor.util.context.Context, .ContextView, java.time.Duration, java.util.Map, .Set

An implementation of HttpClientRequest that is used as a place-holder for HTTP requests when their execution fails and a HttpClientRequest instance cannot be created.
Author
Violeta Georgieva

Field Summary

Modifier and TypeField and Description
pack-priv final ContextView
pack-priv final ClientCookieDecoder
pack-priv static final String[]
pack-priv final HttpHeaders
pack-priv final boolean
pack-priv final HttpMethod
pack-priv final String
pack-priv final Duration
pack-priv final String

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public HttpClientRequest
addCookie(Cookie cookie)

Implements reactor.netty.http.client.HttpClientRequest.addCookie.

Add an outbound cookie.
public HttpClientRequest
addHeader(CharSequence
header name
name
,
CharSequence
header value
value
)

Implements reactor.netty.http.client.HttpClientRequest.addHeader.

Add an outbound http header, appending the value if the header is already set.
public Map<CharSequence, Set<Cookie>>
cookies()

Implements reactor.netty.http.HttpInfos.cookies.

Returns resolved HTTP cookies.
public Context
currentContext()

Implements reactor.netty.http.client.HttpClientInfos.currentContext.

Return the current Context associated with the Mono/Flux exposed via HttpClient.ResponseReceiver#response() or related terminating API.
public ContextView
currentContextView()

Implements reactor.netty.http.client.HttpClientInfos.currentContextView.

Return the current ContextView associated with the Mono/Flux exposed via HttpClient.ResponseReceiver#response() or related terminating API.
public String
fullPath()

Implements reactor.netty.http.HttpInfos.fullPath.

Returns the decoded path portion from the uri().
public HttpClientRequest
header(CharSequence
headers key
name
,
CharSequence
header value
value
)

Implements reactor.netty.http.client.HttpClientRequest.header.

Set an outbound header, replacing any pre-existing value.
public HttpClientRequest
headers(HttpHeaders
a netty headers map
headers
)

Implements reactor.netty.http.client.HttpClientRequest.headers.

Set outbound headers from the passed headers.
public boolean
isFollowRedirect()

Implements reactor.netty.http.client.HttpClientRequest.isFollowRedirect.

Return true if redirected will be followed.
public boolean
isKeepAlive()

Implements reactor.netty.http.HttpInfos.isKeepAlive.

Is the request keep alive.
public boolean
isWebsocket()

Implements reactor.netty.http.HttpInfos.isWebsocket.

Returns true if websocket connection (upgraded).
public HttpMethod
method()

Implements reactor.netty.http.HttpInfos.method.

Returns the resolved request method (HTTP 1.1 etc.).
public String[]
redirectedFrom()

Implements reactor.netty.http.client.HttpClientInfos.redirectedFrom.

Return the previous redirections or empty array.
public HttpHeaders
requestHeaders()

Implements reactor.netty.http.client.HttpClientInfos.requestHeaders.

Return outbound headers to be sent.
public String
requestId()

Implements reactor.netty.http.HttpInfos.requestId.

Return a unique id for the request.
public String
resourceUrl()

Implements reactor.netty.http.client.HttpClientInfos.resourceUrl.

Return the fully qualified URL of the requested resource.
public HttpClientRequest
responseTimeout(Duration
the maximum duration allowed between each network-level read operations (resolution: ms).
maxReadOperationInterval
)

Implements reactor.netty.http.client.HttpClientRequest.responseTimeout.

Specifies the maximum duration allowed between each network-level read operation while reading a given response (resolution: ms).
public String
uri()

Implements reactor.netty.http.HttpInfos.uri.

Returns the resolved target address.
public HttpVersion
version()

Implements reactor.netty.http.HttpInfos.version.

Returns the resolved request version (HTTP 1.1 etc).
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contextViewback to summary
pack-priv final ContextView contextView
cookieDecoderback to summary
pack-priv final ClientCookieDecoder cookieDecoder
EMPTYback to summary
pack-priv static final String[] EMPTY
headersback to summary
pack-priv final HttpHeaders headers
isWebsocketback to summary
pack-priv final boolean isWebsocket
methodback to summary
pack-priv final HttpMethod method
pathback to summary
pack-priv final String path
responseTimeoutback to summary
pack-priv final Duration responseTimeout
uriback to summary
pack-priv final String uri

Constructor Detail

FailedHttpClientRequestback to summary
pack-priv FailedHttpClientRequest(ContextView contextView, HttpClientConfig c)

Method Detail

addCookieback to summary
public HttpClientRequest addCookie(Cookie cookie)

Implements reactor.netty.http.client.HttpClientRequest.addCookie.

Doc from reactor.netty.http.client.HttpClientRequest.addCookie.

Add an outbound cookie.

Returns:HttpClientRequest

this outbound

Annotations
@Override
addHeaderback to summary
public HttpClientRequest addHeader(CharSequence name, CharSequence value)

Implements reactor.netty.http.client.HttpClientRequest.addHeader.

Doc from reactor.netty.http.client.HttpClientRequest.addHeader.

Add an outbound http header, appending the value if the header is already set.

Parameters
name:CharSequence

header name

value:CharSequence

header value

Returns:HttpClientRequest

this outbound

Annotations
@Override
cookiesback to summary
public Map<CharSequence, Set<Cookie>> cookies()

Implements reactor.netty.http.HttpInfos.cookies.

Doc from reactor.netty.http.HttpInfos.cookies.

Returns resolved HTTP cookies.

Returns:Map<CharSequence, Set<Cookie>>

Resolved HTTP cookies

Annotations
@Override
currentContextback to summary
public Context currentContext()

Implements reactor.netty.http.client.HttpClientInfos.currentContext.

Doc from reactor.netty.http.client.HttpClientInfos.currentContext.

Return the current Context associated with the Mono/Flux exposed via HttpClient.ResponseReceiver#response() or related terminating API.

Returns:Context

the current user Context

Annotations
@Override
@SuppressWarnings:deprecation
currentContextViewback to summary
public ContextView currentContextView()

Implements reactor.netty.http.client.HttpClientInfos.currentContextView.

Doc from reactor.netty.http.client.HttpClientInfos.currentContextView.

Return the current ContextView associated with the Mono/Flux exposed via HttpClient.ResponseReceiver#response() or related terminating API.

Returns:ContextView

the current user ContextView

Annotations
@Override
fullPathback to summary
public String fullPath()

Implements reactor.netty.http.HttpInfos.fullPath.

Doc from reactor.netty.http.HttpInfos.fullPath.

Returns the decoded path portion from the uri().

Returns:String

the decoded path portion from the uri()

Annotations
@Override
headerback to summary
public HttpClientRequest header(CharSequence name, CharSequence value)

Implements reactor.netty.http.client.HttpClientRequest.header.

Doc from reactor.netty.http.client.HttpClientRequest.header.

Set an outbound header, replacing any pre-existing value.

Parameters
name:CharSequence

headers key

value:CharSequence

header value

Returns:HttpClientRequest

this outbound

Annotations
@Override
headersback to summary
public HttpClientRequest headers(HttpHeaders headers)

Implements reactor.netty.http.client.HttpClientRequest.headers.

Doc from reactor.netty.http.client.HttpClientRequest.headers.

Set outbound headers from the passed headers. It will however ignore HOST header key. Any pre-existing value for the passed headers will be replaced.

Parameters
headers:HttpHeaders

a netty headers map

Returns:HttpClientRequest

this outbound

Annotations
@Override
isFollowRedirectback to summary
public boolean isFollowRedirect()

Implements reactor.netty.http.client.HttpClientRequest.isFollowRedirect.

Doc from reactor.netty.http.client.HttpClientRequest.isFollowRedirect.

Return true if redirected will be followed.

Returns:boolean

true if redirected will be followed

Annotations
@Override
isKeepAliveback to summary
public boolean isKeepAlive()

Implements reactor.netty.http.HttpInfos.isKeepAlive.

Doc from reactor.netty.http.HttpInfos.isKeepAlive.

Is the request keep alive.

Returns:boolean

is keep alive

Annotations
@Override
isWebsocketback to summary
public boolean isWebsocket()

Implements reactor.netty.http.HttpInfos.isWebsocket.

Doc from reactor.netty.http.HttpInfos.isWebsocket.

Returns true if websocket connection (upgraded).

Returns:boolean

true if websocket connection

Annotations
@Override
methodback to summary
public HttpMethod method()

Implements reactor.netty.http.HttpInfos.method.

Doc from reactor.netty.http.HttpInfos.method.

Returns the resolved request method (HTTP 1.1 etc.).

Returns:HttpMethod

the resolved request method (HTTP 1.1 etc.)

Annotations
@Override
redirectedFromback to summary
public String[] redirectedFrom()

Implements reactor.netty.http.client.HttpClientInfos.redirectedFrom.

Doc from reactor.netty.http.client.HttpClientInfos.redirectedFrom.

Return the previous redirections or empty array.

Returns:String[]

the previous redirections or empty array

Annotations
@Override
requestHeadersback to summary
public HttpHeaders requestHeaders()

Implements reactor.netty.http.client.HttpClientInfos.requestHeaders.

Doc from reactor.netty.http.client.HttpClientInfos.requestHeaders.

Return outbound headers to be sent.

Returns:HttpHeaders

outbound headers to be sent

Annotations
@Override
requestIdback to summary
public String requestId()

Implements reactor.netty.http.HttpInfos.requestId.

Doc from reactor.netty.http.HttpInfos.requestId.

Return a unique id for the request. The id is a combination of the id of the underlying connection and the serial number of the request received on that connection.

Format of the id: <CONNECTION_ID>-<REQUEST_NUMBER>

Example: <CONNECTION_ID>: 329c6ffd <REQUEST_NUMBER>: 5 Result: 329c6ffd-5

Returns:String

an unique id for the request

Annotations
@Override
resourceUrlback to summary
public String resourceUrl()

Implements reactor.netty.http.client.HttpClientInfos.resourceUrl.

Doc from reactor.netty.http.client.HttpClientInfos.resourceUrl.

Return the fully qualified URL of the requested resource. In case of redirects, return the URL the last redirect led to.

Returns:String

The URL of the retrieved resource. This method can return null in case there was an error before the client could create the URL

Annotations
@Override
responseTimeoutback to summary
public HttpClientRequest responseTimeout(Duration maxReadOperationInterval)

Implements reactor.netty.http.client.HttpClientRequest.responseTimeout.

Doc from reactor.netty.http.client.HttpClientRequest.responseTimeout.

Specifies the maximum duration allowed between each network-level read operation while reading a given response (resolution: ms). In other words, io.netty.handler.timeout.ReadTimeoutHandler is added to the channel pipeline after sending the request and is removed when the response is fully received. If the maxReadOperationInterval is null, any previous setting will be removed and no maxReadOperationInterval will be applied. If the maxReadOperationInterval is less than 1ms, then 1ms will be the maxReadOperationInterval. The maxReadOperationInterval setting on HttpClientRequest level overrides any maxReadOperationInterval setting on HttpClient level.

Parameters
maxReadOperationInterval:Duration

the maximum duration allowed between each network-level read operations (resolution: ms).

Returns:HttpClientRequest

this outbound

Annotations
@Override
uriback to summary
public String uri()

Implements reactor.netty.http.HttpInfos.uri.

Doc from reactor.netty.http.HttpInfos.uri.

Returns the resolved target address.

Returns:String

the resolved target address

Annotations
@Override
versionback to summary
public HttpVersion version()

Implements reactor.netty.http.HttpInfos.version.

Doc from reactor.netty.http.HttpInfos.version.

Returns the resolved request version (HTTP 1.1 etc).

Returns:HttpVersion

the resolved request version (HTTP 1.1 etc)

Annotations
@Override