Package com.linecorp.armeria.client
Class ClientFactoryOptions
java.lang.Object
com.linecorp.armeria.common.util.AbstractOptions<ClientFactoryOption<Object>,ClientFactoryOptionValue<Object>>
com.linecorp.armeria.client.ClientFactoryOptions
- All Implemented Interfaces:
Iterable<ClientFactoryOptionValue<Object>>
public final class ClientFactoryOptions extends AbstractOptions<ClientFactoryOption<Object>,ClientFactoryOptionValue<Object>>
A set of
ClientFactoryOption
s and their respective values.-
Method Summary
Modifier and Type Method Description Function<? super EventLoopGroup,? extends AddressResolverGroup<? extends InetSocketAddress>>
addressResolverGroupFactory()
Returns the factory that creates anAddressResolverGroup
which resolves remote addresses intoInetSocketAddress
es.Map<ChannelOption<?>,Object>
channelOptions()
Returns theChannelOption
s of the sockets created by theClientFactory
.ConnectionPoolListener
connectionPoolListener()
Returns the listener which is notified on a connection pool event.Function<? super EventLoopGroup,? extends EventLoopScheduler>
eventLoopSchedulerFactory()
Returns the factory that creates anEventLoopScheduler
which is responsible for assigning anEventLoop
to handle a connection to the specifiedEndpoint
.int
http1MaxChunkSize()
Returns the maximum length of each chunk in an HTTP/1 response content.int
http1MaxHeaderSize()
Returns the maximum length of all headers in an HTTP/1 response.int
http1MaxInitialLineLength()
Returns the maximum length of an HTTP/1 response initial line.int
http2InitialConnectionWindowSize()
Returns the HTTP/2 initial connection flow-control window size.int
http2InitialStreamWindowSize()
Returns the SETTINGS_INITIAL_WINDOW_SIZE for HTTP/2 stream-level flow control.int
http2MaxFrameSize()
Returns the SETTINGS_MAX_FRAME_SIZE that indicates the size of the largest frame payload that this client is willing to receive.long
http2MaxHeaderListSize()
Returns the HTTP/2 SETTINGS_MAX_HEADER_LIST_SIZE that indicates the maximum size of header list that the client is prepared to accept, in octets.long
idleTimeoutMillis()
Returns the idle timeout of a socket connection in milliseconds.MeterRegistry
meterRegistry()
Returns theMeterRegistry
which collects various stats.static ClientFactoryOptions
of()
Returns an empty singletonClientFactoryOptions
.static ClientFactoryOptions
of(ClientFactoryOptions baseOptions, ClientFactoryOptionValue<?>... additionalValues)
Merges the specifiedClientFactoryOptions
andClientFactoryOptionValue
s.static ClientFactoryOptions
of(ClientFactoryOptions baseOptions, Iterable<? extends ClientFactoryOptionValue<?>> additionalValues)
Merges the specifiedClientFactoryOptions
andClientFactoryOptionValue
s.static ClientFactoryOptions
of(ClientFactoryOptionValue<?>... values)
Returns theClientFactoryOptions
with the specifiedClientFactoryOptionValue
s.static ClientFactoryOptions
of(Iterable<? extends ClientFactoryOptionValue<?>> values)
Returns theClientFactoryOptions
with the specifiedClientFactoryOptionValue
s.long
pingIntervalMillis()
Returns the PING interval in milliseconds.ProxyConfig
proxyConfig()
TheProxyConfig
which contains the proxy configuration.boolean
shutdownWorkerGroupOnClose()
Returns the flag whether to shut down the workerEventLoopGroup
when theClientFactory
is closed.Consumer<? super SslContextBuilder>
tlsCustomizer()
Returns theConsumer
which can arbitrarily configure theSslContextBuilder
that will be applied to the SSL session.boolean
useHttp1Pipelining()
Returns whether to use HTTP pipelining for HTTP/1 connections.boolean
useHttp2Preface()
Returns whether to send an HTTP/2 preface string instead of an HTTP/1 upgrade request to negotiate the protocol version of a cleartext HTTP connection.EventLoopGroup
workerGroup()
Returns the workerEventLoopGroup
.Methods inherited from class com.linecorp.armeria.common.util.AbstractOptions
asMap, get, iterator, toString
-
Method Details
-
of
Returns an empty singletonClientFactoryOptions
. -
of
Returns theClientFactoryOptions
with the specifiedClientFactoryOptionValue
s. -
of
Returns theClientFactoryOptions
with the specifiedClientFactoryOptionValue
s. -
of
public static ClientFactoryOptions of(ClientFactoryOptions baseOptions, ClientFactoryOptionValue<?>... additionalValues)Merges the specifiedClientFactoryOptions
andClientFactoryOptionValue
s.- Returns:
- the merged
ClientFactoryOptions
-
of
public static ClientFactoryOptions of(ClientFactoryOptions baseOptions, Iterable<? extends ClientFactoryOptionValue<?>> additionalValues)Merges the specifiedClientFactoryOptions
andClientFactoryOptionValue
s.- Returns:
- the merged
ClientFactoryOptions
-
workerGroup
Returns the workerEventLoopGroup
. -
shutdownWorkerGroupOnClose
public boolean shutdownWorkerGroupOnClose()Returns the flag whether to shut down the workerEventLoopGroup
when theClientFactory
is closed. -
eventLoopSchedulerFactory
Returns the factory that creates anEventLoopScheduler
which is responsible for assigning anEventLoop
to handle a connection to the specifiedEndpoint
. -
channelOptions
Returns theChannelOption
s of the sockets created by theClientFactory
. -
tlsCustomizer
Returns theConsumer
which can arbitrarily configure theSslContextBuilder
that will be applied to the SSL session. -
addressResolverGroupFactory
public Function<? super EventLoopGroup,? extends AddressResolverGroup<? extends InetSocketAddress>> addressResolverGroupFactory()Returns the factory that creates anAddressResolverGroup
which resolves remote addresses intoInetSocketAddress
es. -
http2InitialConnectionWindowSize
public int http2InitialConnectionWindowSize()Returns the HTTP/2 initial connection flow-control window size. -
http2InitialStreamWindowSize
public int http2InitialStreamWindowSize()Returns the SETTINGS_INITIAL_WINDOW_SIZE for HTTP/2 stream-level flow control. -
http2MaxFrameSize
public int http2MaxFrameSize()Returns the SETTINGS_MAX_FRAME_SIZE that indicates the size of the largest frame payload that this client is willing to receive. -
http2MaxHeaderListSize
public long http2MaxHeaderListSize()Returns the HTTP/2 SETTINGS_MAX_HEADER_LIST_SIZE that indicates the maximum size of header list that the client is prepared to accept, in octets. -
http1MaxInitialLineLength
public int http1MaxInitialLineLength()Returns the maximum length of an HTTP/1 response initial line. -
http1MaxHeaderSize
public int http1MaxHeaderSize()Returns the maximum length of all headers in an HTTP/1 response. -
http1MaxChunkSize
public int http1MaxChunkSize()Returns the maximum length of each chunk in an HTTP/1 response content. -
idleTimeoutMillis
public long idleTimeoutMillis()Returns the idle timeout of a socket connection in milliseconds. -
pingIntervalMillis
public long pingIntervalMillis() -
useHttp2Preface
public boolean useHttp2Preface()Returns whether to send an HTTP/2 preface string instead of an HTTP/1 upgrade request to negotiate the protocol version of a cleartext HTTP connection. -
useHttp1Pipelining
public boolean useHttp1Pipelining()Returns whether to use HTTP pipelining for HTTP/1 connections. -
connectionPoolListener
Returns the listener which is notified on a connection pool event. -
meterRegistry
Returns theMeterRegistry
which collects various stats. -
proxyConfig
TheProxyConfig
which contains the proxy configuration.
-