Package com.linecorp.armeria.client
Class ClientFactoryOption<T>
java.lang.Object
com.linecorp.armeria.common.util.AbstractOption<ClientFactoryOption<T>,ClientFactoryOptionValue<T>,T>
com.linecorp.armeria.client.ClientFactoryOption<T>
- Type Parameters:
T
- the type of the option value
- All Implemented Interfaces:
Comparable<AbstractOption<?,?,?>>
public final class ClientFactoryOption<T> extends AbstractOption<ClientFactoryOption<T>,ClientFactoryOptionValue<T>,T>
A
ClientFactory
option.-
Nested Class Summary
Nested classes/interfaces inherited from class com.linecorp.armeria.common.util.AbstractOption
AbstractOption.Factory<T extends AbstractOption<T,U,V>,U extends AbstractOptionValue<U,T,V>,V>
-
Field Summary
-
Method Summary
Modifier and Type Method Description static Set<ClientFactoryOption<?>>
allOptions()
Returns the all availableClientFactoryOption
s.static <T> ClientFactoryOption<T>
define(String name, T defaultValue)
Defines a newClientFactoryOption
of the specified name and default value.static <T> ClientFactoryOption<T>
define(String name, T defaultValue, Function<T,T> validator, BiFunction<ClientFactoryOptionValue<T>,ClientFactoryOptionValue<T>,ClientFactoryOptionValue<T>> mergeFunction)
Defines a newClientFactoryOption
of the specified name, default value and merge function.protected ClientFactoryOptionValue<T>
doNewValue(T value)
Implement this method to return a new option value.static ClientFactoryOption<?>
of(String name)
Returns theClientFactoryOption
with the specifiedname
.Methods inherited from class com.linecorp.armeria.common.util.AbstractOption
allOptions, compareTo, defaultValue, define, equals, hashCode, name, newValue, of, toString
-
Field Details
-
WORKER_GROUP
Deprecated.The workerEventLoopGroup
. -
SHUTDOWN_WORKER_GROUP_ON_CLOSE
Deprecated.Whether to shut down the workerEventLoopGroup
when theClientFactory
is closed. -
EVENT_LOOP_SCHEDULER_FACTORY
@Deprecated public static final ClientFactoryOption<Function<? super EventLoopGroup,? extends EventLoopScheduler>> EVENT_LOOP_SCHEDULER_FACTORYDeprecated.The factory that creates anEventLoopScheduler
which is responsible for assigning anEventLoop
to handle a connection to the specifiedEndpoint
. -
CHANNEL_OPTIONS
Deprecated.TheChannelOption
s of the sockets created by theClientFactory
. -
TLS_CUSTOMIZER
@Deprecated public static final ClientFactoryOption<Consumer<? super SslContextBuilder>> TLS_CUSTOMIZERDeprecated.TheConsumer
which can arbitrarily configure theSslContextBuilder
that will be applied to the SSL session. -
ADDRESS_RESOLVER_GROUP_FACTORY
@Deprecated public static final ClientFactoryOption<Function<? super EventLoopGroup,? extends AddressResolverGroup<? extends InetSocketAddress>>> ADDRESS_RESOLVER_GROUP_FACTORYDeprecated.The factory that creates anAddressResolverGroup
which resolves remote addresses intoInetSocketAddress
es. -
HTTP2_INITIAL_CONNECTION_WINDOW_SIZE
Deprecated.The HTTP/2 initial connection flow-control window size. -
HTTP2_INITIAL_STREAM_WINDOW_SIZE
Deprecated.The SETTINGS_INITIAL_WINDOW_SIZE for HTTP/2 stream-level flow control. -
HTTP2_MAX_FRAME_SIZE
Deprecated.The SETTINGS_MAX_FRAME_SIZE that indicates the size of the largest frame payload that this client is willing to receive. -
HTTP2_MAX_HEADER_LIST_SIZE
Deprecated.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. -
HTTP1_MAX_INITIAL_LINE_LENGTH
Deprecated.The maximum length of an HTTP/1 response initial line. -
HTTP1_MAX_HEADER_SIZE
Deprecated.The maximum length of all headers in an HTTP/1 response. -
HTTP1_MAX_CHUNK_SIZE
Deprecated.The maximum length of each chunk in an HTTP/1 response content. -
IDLE_TIMEOUT_MILLIS
Deprecated.The idle timeout of a socket connection in milliseconds. -
PING_INTERVAL_MILLIS
Deprecated. -
USE_HTTP2_PREFACE
Deprecated.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. -
USE_HTTP1_PIPELINING
Deprecated.Whether to use HTTP pipelining for HTTP/1 connections. -
CONNECTION_POOL_LISTENER
@Deprecated public static final ClientFactoryOption<ConnectionPoolListener> CONNECTION_POOL_LISTENERDeprecated.The listener which is notified on a connection pool event. -
METER_REGISTRY
Deprecated.TheMeterRegistry
which collects various stats. -
PROXY_CONFIG_SELECTOR
Deprecated.TheProxyConfigSelector
which determines theProxyConfig
to be used.
-
-
Method Details
-
allOptions
Returns the all availableClientFactoryOption
s. -
of
Returns theClientFactoryOption
with the specifiedname
.- Throws:
NoSuchElementException
- if there's no such option defined.
-
define
Defines a newClientFactoryOption
of the specified name and default value.- Parameters:
name
- the name of the option.defaultValue
- the default value of the option, which will be used when unspecified.- Throws:
IllegalStateException
- if an option with the specified name exists already.
-
define
public static <T> ClientFactoryOption<T> define(String name, T defaultValue, Function<T,T> validator, BiFunction<ClientFactoryOptionValue<T>,ClientFactoryOptionValue<T>,ClientFactoryOptionValue<T>> mergeFunction)Defines a newClientFactoryOption
of the specified name, default value and merge function.- Parameters:
name
- the name of the option.defaultValue
- the default value of the option, which will be used when unspecified.validator
- theFunction
which is used for validating and normalizing an option value.mergeFunction
- theBiFunction
which is used for merging old and new option values.- Throws:
IllegalStateException
- if an option with the specified name exists already.
-
doNewValue
Description copied from class:AbstractOption
Implement this method to return a new option value.- Specified by:
doNewValue
in classAbstractOption<ClientFactoryOption<T>,ClientFactoryOptionValue<T>,T>
-