Package com.linecorp.armeria.client
Interface RequestOptions
A
RequestOptions
for an HttpRequest
.-
Method Summary
Modifier and TypeMethodDescriptionMap<AttributeKey<?>,
Object> attrs()
Returns theMap
of all attributes thisRequestOptions
contains.static RequestOptionsBuilder
builder()
Returns a newly createdRequestOptionsBuilder
.static RequestOptionsBuilder
builder
(RequestOptions requestOptions) Returns a newly createdRequestOptionsBuilder
with the specifiedRequestOptions
.long
Returns the maximum length of the receivedResponse
.static RequestOptions
of()
Returns an emptyRequestOptions
.long
default RequestOptionsBuilder
Returns a new builder created from the properties of thisRequestOptions
.long
Returns the amount of time allowed until the initial write attempt of the currentRequest
succeeds.
-
Method Details
-
of
Returns an emptyRequestOptions
. -
builder
Returns a newly createdRequestOptionsBuilder
. -
builder
Returns a newly createdRequestOptionsBuilder
with the specifiedRequestOptions
. -
toBuilder
Returns a new builder created from the properties of thisRequestOptions
. -
responseTimeoutMillis
long responseTimeoutMillis() -
writeTimeoutMillis
long writeTimeoutMillis()Returns the amount of time allowed until the initial write attempt of the currentRequest
succeeds.0
disables the limit.-1
disables this option and the write timeout of a client will be used instead. -
maxResponseLength
long maxResponseLength()Returns the maximum length of the receivedResponse
.0
disables the limit.-1
disables this option and the maximum response length of a client will be used instead. -
attrs
Map<AttributeKey<?>,Object> attrs()Returns theMap
of all attributes thisRequestOptions
contains. -
exchangeType
Returns theExchangeType
that determines whether to stream anHttpRequest
orHttpResponse
.ExchangeType.BIDI_STREAMING
is assumed if this method returnsnull
.Note that an
HttpRequest
will be aggregated before being written ifExchangeType.UNARY
orExchangeType.RESPONSE_STREAMING
is set.
-