public final class ClientFactoryOptions extends AbstractOptions
ClientFactoryOptions and their respective values.| Modifier and Type | Method and Description |
|---|---|
Function<? super io.netty.channel.EventLoopGroup,? extends io.netty.resolver.AddressResolverGroup<? extends InetSocketAddress>> |
addressResolverGroupFactory()
Returns the factory that creates an
AddressResolverGroup which resolves remote addresses into
InetSocketAddresses. |
Map<ClientFactoryOption<Object>,ClientFactoryOptionValue<Object>> |
asMap()
Converts this
ClientFactoryOptions to a Map. |
Map<io.netty.channel.ChannelOption<?>,Object> |
channelOptions()
Returns the
ChannelOptions of the sockets created by the ClientFactory. |
ConnectionPoolListener |
connectionPoolListener()
Returns the listener which is notified on a connection pool event.
|
Function<? super io.netty.channel.EventLoopGroup,? extends EventLoopScheduler> |
eventLoopSchedulerFactory()
Returns the factory that creates an
EventLoopScheduler which is responsible for assigning an
EventLoop to handle a connection to the specified Endpoint. |
<T> T |
get(ClientFactoryOption<T> option)
Returns the value of the specified
ClientFactoryOption. |
<T> T |
getOrElse(ClientFactoryOption<T> option,
T defaultValue)
Returns the value of the specified
ClientFactoryOption. |
<T> T |
getOrNull(ClientFactoryOption<T> option)
Returns the value of the specified
ClientFactoryOption. |
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 the
MeterRegistry which collects various stats. |
static ClientFactoryOptions |
of()
The default
ClientFactoryOptions. |
static ClientFactoryOptions |
of(ClientFactoryOptions baseOptions,
ClientFactoryOptions options)
Merges the specified two
ClientFactoryOptionss. |
static ClientFactoryOptions |
of(ClientFactoryOptions baseOptions,
ClientFactoryOptionValue<?>... options)
Merges the specified
ClientFactoryOptions and ClientFactoryOptionValues. |
static ClientFactoryOptions |
of(ClientFactoryOptions baseOptions,
Iterable<ClientFactoryOptionValue<?>> options)
Merges the specified
ClientFactoryOptions and ClientFactoryOptionValues. |
static ClientFactoryOptions |
of(ClientFactoryOptionValue<?>... options)
Returns the
ClientFactoryOptions with the specified ClientFactoryOptionValues. |
static ClientFactoryOptions |
of(Iterable<ClientFactoryOptionValue<?>> options)
Returns the
ClientFactoryOptions with the specified ClientFactoryOptionValues. |
boolean |
shutdownWorkerGroupOnClose()
Returns the flag whether to shut down the worker
EventLoopGroup
when the ClientFactory is closed. |
Consumer<? super io.netty.handler.ssl.SslContextBuilder> |
sslContextCustomizer()
Deprecated.
Use
tlsCustomizer(). |
Consumer<? super io.netty.handler.ssl.SslContextBuilder> |
tlsCustomizer()
Returns the
Consumer which can arbitrarily configure the SslContextBuilder 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.
|
io.netty.channel.EventLoopGroup |
workerGroup()
Returns the worker
EventLoopGroup. |
asMap0, get0, getOrElse0, getOrNull0, toStringpublic static ClientFactoryOptions of()
ClientFactoryOptions.public static ClientFactoryOptions of(ClientFactoryOptionValue<?>... options)
ClientFactoryOptions with the specified ClientFactoryOptionValues.public static ClientFactoryOptions of(Iterable<ClientFactoryOptionValue<?>> options)
ClientFactoryOptions with the specified ClientFactoryOptionValues.public static ClientFactoryOptions of(ClientFactoryOptions baseOptions, ClientFactoryOptionValue<?>... options)
ClientFactoryOptions and ClientFactoryOptionValues.ClientFactoryOptionspublic static ClientFactoryOptions of(ClientFactoryOptions baseOptions, Iterable<ClientFactoryOptionValue<?>> options)
ClientFactoryOptions and ClientFactoryOptionValues.ClientFactoryOptionspublic static ClientFactoryOptions of(ClientFactoryOptions baseOptions, ClientFactoryOptions options)
ClientFactoryOptionss.ClientFactoryOptionspublic <T> T get(ClientFactoryOption<T> option)
ClientFactoryOption.ClientFactoryOptionNoSuchElementException - if no value is set for the specified ClientFactoryOption.public <T> T getOrNull(ClientFactoryOption<T> option)
ClientFactoryOption.ClientFactoryOption, or
null if the specified ClientFactoryOption is not set.public <T> T getOrElse(ClientFactoryOption<T> option, T defaultValue)
ClientFactoryOption.ClientFactoryOption, or
defaultValue if the specified ClientFactoryOption is not set.public Map<ClientFactoryOption<Object>,ClientFactoryOptionValue<Object>> asMap()
ClientFactoryOptions to a Map.public io.netty.channel.EventLoopGroup workerGroup()
EventLoopGroup.public boolean shutdownWorkerGroupOnClose()
EventLoopGroup
when the ClientFactory is closed.public Function<? super io.netty.channel.EventLoopGroup,? extends EventLoopScheduler> eventLoopSchedulerFactory()
EventLoopScheduler which is responsible for assigning an
EventLoop to handle a connection to the specified Endpoint.public Map<io.netty.channel.ChannelOption<?>,Object> channelOptions()
ChannelOptions of the sockets created by the ClientFactory.@Deprecated public Consumer<? super io.netty.handler.ssl.SslContextBuilder> sslContextCustomizer()
tlsCustomizer().Consumer which can arbitrarily configure the SslContextBuilder that will be
applied to the SSL session.public Consumer<? super io.netty.handler.ssl.SslContextBuilder> tlsCustomizer()
Consumer which can arbitrarily configure the SslContextBuilder that will be
applied to the SSL session.public Function<? super io.netty.channel.EventLoopGroup,? extends io.netty.resolver.AddressResolverGroup<? extends InetSocketAddress>> addressResolverGroupFactory()
AddressResolverGroup which resolves remote addresses into
InetSocketAddresses.public int http2InitialConnectionWindowSize()
public int http2InitialStreamWindowSize()
public int http2MaxFrameSize()
public long http2MaxHeaderListSize()
public int http1MaxInitialLineLength()
public int http1MaxHeaderSize()
public int http1MaxChunkSize()
public long idleTimeoutMillis()
public boolean useHttp2Preface()
public boolean useHttp1Pipelining()
public ConnectionPoolListener connectionPoolListener()
public MeterRegistry meterRegistry()
MeterRegistry which collects various stats.Copyright © 2020 LeanCloud. All rights reserved.