Package com.linecorp.armeria.client
Class ClientOptions
java.lang.Object
com.linecorp.armeria.common.util.AbstractOptions<ClientOption<Object>,ClientOptionValue<Object>>
com.linecorp.armeria.client.ClientOptions
- All Implemented Interfaces:
Iterable<ClientOptionValue<Object>>
public final class ClientOptions extends AbstractOptions<ClientOption<Object>,ClientOptionValue<Object>>
A set of
ClientOption
s and their respective values.-
Method Summary
Modifier and Type Method Description static ClientOptionsBuilder
builder()
Returns a newly createdClientOptionsBuilder
.ClientDecoration
decoration()
Returns theFunction
s that decorate the components of a client.Function<? super Endpoint,? extends EndpointGroup>
endpointRemapper()
ClientFactory
factory()
Returns theClientFactory
used for creating a client.HttpHeaders
httpHeaders()
Returns the additional HTTP headers to send with requests.long
maxResponseLength()
Returns the maximum allowed length of a server response.static ClientOptions
of()
Returns an empty singletonClientOptions
.static ClientOptions
of(ClientOptions baseOptions, ClientOptionValue<?>... additionalValues)
Merges the specifiedClientOptions
andClientOptionValue
s.static ClientOptions
of(ClientOptions baseOptions, Iterable<? extends ClientOptionValue<?>> additionalValues)
Merges the specifiedClientOptions
andClientOptionValue
s.static ClientOptions
of(ClientOptionValue<?>... values)
Returns theClientOptions
with the specifiedClientOptionValue
s.static ClientOptions
of(Iterable<? extends ClientOptionValue<?>> values)
Returns theClientOptions
with the specifiedClientOptionValue
s.Supplier<RequestId>
requestIdGenerator()
long
responseTimeoutMillis()
Returns the timeout of a server reply to a client call.ClientOptionsBuilder
toBuilder()
Returns a newClientOptionsBuilder
created from thisClientOptions
.long
writeTimeoutMillis()
Returns the timeout of a socket write.Methods inherited from class com.linecorp.armeria.common.util.AbstractOptions
asMap, get, iterator, toString
-
Method Details
-
of
Returns an empty singletonClientOptions
. -
of
Returns theClientOptions
with the specifiedClientOptionValue
s. -
of
Returns theClientOptions
with the specifiedClientOptionValue
s. -
of
public static ClientOptions of(ClientOptions baseOptions, ClientOptionValue<?>... additionalValues)Merges the specifiedClientOptions
andClientOptionValue
s.- Returns:
- the merged
ClientOptions
-
of
public static ClientOptions of(ClientOptions baseOptions, Iterable<? extends ClientOptionValue<?>> additionalValues)Merges the specifiedClientOptions
andClientOptionValue
s.- Returns:
- the merged
ClientOptions
-
builder
Returns a newly createdClientOptionsBuilder
. -
factory
Returns theClientFactory
used for creating a client. -
writeTimeoutMillis
public long writeTimeoutMillis()Returns the timeout of a socket write. -
responseTimeoutMillis
public long responseTimeoutMillis()Returns the timeout of a server reply to a client call. -
maxResponseLength
public long maxResponseLength()Returns the maximum allowed length of a server response. -
decoration
Returns theFunction
s that decorate the components of a client. -
httpHeaders
Returns the additional HTTP headers to send with requests. Used only when the underlyingSessionProtocol
is HTTP. -
requestIdGenerator
-
endpointRemapper
- See Also:
ClientBuilder.endpointRemapper(Function)
-
toBuilder
Returns a newClientOptionsBuilder
created from thisClientOptions
.
-