Interface GrpcClientConfig
- All Superinterfaces:
HttpClientConfig, HttpConfigBase, Prototype.Api, Prototype.Factory<GrpcClient>
- All Known Implementing Classes:
GrpcClientConfig.BuilderBase.GrpcClientConfigImpl
Configuration of a grpc client.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classFluent API builder forGrpcClient.static classGrpcClientConfig.BuilderBase<BUILDER extends GrpcClientConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends GrpcClientConfig>Fluent API builder base forGrpcClientConfig. -
Method Summary
Modifier and TypeMethodDescriptionstatic GrpcClientConfig.Builderbuilder()Create a new fluent API builder to customize configuration.static GrpcClientConfig.Builderbuilder(GrpcClientConfig instance) Create a new fluent API builder from an existing instance.AClientUriSupplierthat can dynamically provide zero or moreClientUris to connect.static GrpcClientConfigcreate()Create a new instance with default values.static GrpcClientConfigCreate a new instance from configuration.booleanWhether to collect metrics for gRPC client calls.gRPC client services.default Optional<MeterRegistry> Meter registry to use for gRPC client metrics.gRPC specific configuration.Methods inherited from interface HttpClientConfig
altSvc, baseAddress, baseFragment, baseQuery, baseUri, connectionCacheSize, connectionListener, contentEncoding, cookieManager, defaultHeadersMap, defaultRequestHeaders, dnsAddressLookup, dnsResolver, executor, filterRedirectHeaders, followCrossOriginEntityRedirects, headers, maxInMemoryEntity, mediaContext, mediaSupports, mediaTypeParserMode, readContinueTimeout, redirectSensitiveHeaders, relativeUris, sendExpectContinue, services, shareConnectionCache, sni, socketOptions, writeBufferSizeModifier and TypeMethodDescriptionaltSvc()Client policy for accepting and using HTTPAlt-Svcresponse advertisements.Base address used by the client in all requests.Base fragment used by the client in all requests (unless overwritten on per-request basis).Base query used by the client in all requests.baseUri()Base uri used by the client in all requests.intMaximum number of reusable physical connections each HTTP protocol retains for a single connection target.Socket lifecycle callbacks.Configure the listener specificContentEncodingContext.WebClient cookie manager.Default headers to be used in every request from configuration.default ClientRequestHeadersDefault headers as a headers object.DNS address lookup preferences to be used by this client.DNS resolver to be used by this client.executor()Client executor service.booleanWhether headers sensitive to cross-origin redirects should be filtered before the redirected request is sent.booleanWhether redirects that preserve request method and entity may be followed across origins.headers()Default headers to be used in every request.intIf the entity is expected to be smaller that this number of bytes, it would be buffered in memory to optimize performance.Configure the listener specificMediaContext.Media supports (manually added).Configure media type parsing mode for HTTPContent-Typeheader.Socket 100-Continue read timeout.Request header names to strip on cross-origin redirects.booleanCan be set totrueto force the use of relative URIs in all requests, regardless of the presence or absence of proxies or no-proxy lists.booleanWhether Expect-100-Continue header is sent to verify server availability before sending an entity.services()WebClient services.booleanWhether to use protocol-specific JVM-wide connection caches shared by compatible WebClient instances.sni()Client-side TLS SNI configuration.Socket options for connections opened by this client.intBuffer size used when writing data to the underlying socket on a client TCP connection.Methods inherited from interface HttpConfigBase
connectTimeout, followRedirects, keepAlive, maxRedirects, properties, proxy, readTimeout, tlsModifier and TypeMethodDescriptionConnect timeout.booleanWhether to follow redirects.booleanDetermines if connection keep alive is enabled (NOT socket keep alive, but HTTP connection keep alive, to re-use the same connection for multiple requests).intMax number of followed redirects.Properties configured for this client.proxy()Proxy configuration to be used for requests.Read timeout.tls()TLS configuration for any TLS request from this client.Methods inherited from interface Prototype.Factory
buildModifier and TypeMethodDescriptionbuild()Create a new instance of the runtime type from this config object.
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Parameters:
instance- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
create
Create a new instance from configuration.- Parameters:
config- used to configure the new instance- Returns:
- a new instance configured from configuration
-
create
-
protocolConfig
GrpcClientProtocolConfig protocolConfig()gRPC specific configuration.- Returns:
- protocol specific configuration
-
clientUriSupplier
Optional<ClientUriSupplier> clientUriSupplier()AClientUriSupplierthat can dynamically provide zero or moreClientUris to connect.- Returns:
- a supplier for zero or more client URIs
-
enableMetrics
boolean enableMetrics()Whether to collect metrics for gRPC client calls.- Returns:
- metrics flag
-
meterRegistry
Meter registry to use for gRPC client metrics.- Returns:
- meter registry to use
-
grpcServices
List<GrpcClientService> grpcServices()gRPC client services. Services are discovered automatically by default.- Returns:
- services to use with this gRPC client
-