final class GrpcClientSettings extends AnyRef
- Annotations
- @ApiMayChange()
- Source
- GrpcClientSettings.scala
- Alphabetic
- By Inheritance
- GrpcClientSettings
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val backend: String
- val callCredentials: Option[CallCredentials]
- val channelBuilderOverrides: (NettyChannelBuilder) => NettyChannelBuilder
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- val compression: Option[String]
- val connectionAttempts: Option[Int]
- val deadline: Duration
- val defaultPort: Int
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val loadBalancingPolicy: Option[String]
- val maxInboundMessageSize: Int
- val minimumTlsVersion: Option[String]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- val overrideAuthority: Option[String]
- val resolveTimeout: FiniteDuration
- val serviceDiscovery: ServiceDiscovery
- val serviceName: String
- val servicePortName: Option[String]
- val serviceProtocol: Option[String]
- val sslContext: Option[SSLContext]
- val sslProvider: Option[SslProvider]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- val trustManager: Option[TrustManager]
- val useTls: Boolean
- val userAgent: Option[String]
- val verifyHostname: Boolean
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- def withBackend(value: String): GrpcClientSettings
- Annotations
- @ApiMayChange()
- def withCallCredentials(value: CallCredentials): GrpcClientSettings
- def withChannelBuilderOverrides(builderOverrides: (NettyChannelBuilder) => NettyChannelBuilder): GrpcClientSettings
To override any default channel configurations used by netty.
To override any default channel configurations used by netty. Only for power users. API may change when io.grpc:grpc-netty-shaded is replaced by io.grpc:grpc-core and Pekko HTTP.
- Annotations
- @ApiMayChange()
- def withCompression(value: String): GrpcClientSettings
The message encoding to compress requests with:
gzip,deflate, oridentityfor no compression, which is the default.The message encoding to compress requests with:
gzip,deflate, oridentityfor no compression, which is the default. A client can't know which encodings a server supports, so only enable compression for servers known to support it. Applies to both the netty and the pekko-http backend.- Since
2.0.0
- def withConnectionAttempts(value: Int): GrpcClientSettings
How many times to retry establishing a connection before failing the client Failure can be monitored using client.stopped and monitoring the Future/CompletionStage.
How many times to retry establishing a connection before failing the client Failure can be monitored using client.stopped and monitoring the Future/CompletionStage. An exponentially increasing backoff is used between attempts.
- def withDeadline(value: Duration): GrpcClientSettings
Each call will have this deadline.
- def withDeadline(value: Duration): GrpcClientSettings
Each call will have this deadline.
- def withDefaultPort(value: Int): GrpcClientSettings
If using ServiceDiscovery and no port is returned use this one.
- def withLoadBalancingPolicy(loadBalancingPolicy: String): GrpcClientSettings
- def withMaxInboundMessageSize(value: Int): GrpcClientSettings
Maximum allowed size for inbound gRPC messages (in bytes).
Maximum allowed size for inbound gRPC messages (in bytes). Applies to the decompressed message size. Messages exceeding this limit will be rejected with RESOURCE_EXHAUSTED status.
- Since
2.0.0
- def withMinimumTlsVersion(version: String): GrpcClientSettings
Set the minimum TLS protocol version to use.
Set the minimum TLS protocol version to use. Accepted values: "TLSv1.2", "TLSv1.3". On older JDKs that do not support the specified version, the connection will fail.
- Since
2.0.0
- Exceptions thrown
IllegalArgumentExceptionifversionis not one of the accepted values
- def withOverrideAuthority(value: String): GrpcClientSettings
- def withResolveTimeout(value: Duration): GrpcClientSettings
Java API: How long to wait for service discovery to resolve the service.
- def withResolveTimeout(value: FiniteDuration): GrpcClientSettings
- def withServicePortName(servicePortName: String): GrpcClientSettings
When using service discovery, port name is the optional parameter to filter the requests.
When using service discovery, port name is the optional parameter to filter the requests. Looking up a service may return multiple ports (http/https/...) if the remote process only serves the grpc service on a specific port you must use this setting.
- def withServiceProtocol(serviceProtocol: String): GrpcClientSettings
- def withSslContext(sslContext: SSLContext): GrpcClientSettings
Prefer using
withContextManager: withSslContext forces the ssl-provider 'jdk'. - def withSslProvider(sslProvider: SslProvider): GrpcClientSettings
- def withTls(enabled: Boolean): GrpcClientSettings
Set to false to use unencrypted HTTP/2.
Set to false to use unencrypted HTTP/2. This should not be used in production system.
- def withTrustManager(trustManager: TrustManager): GrpcClientSettings
- def withUserAgent(value: String): GrpcClientSettings
Provides a custom
User-Agentfor the application.Provides a custom
User-Agentfor the application.It's an optional parameter. The library will provide a user agent independent of this option. If provided, the given agent will prepend the library's user agent information.
- def withVerifyHostname(value: Boolean): GrpcClientSettings
Whether to verify the server's hostname against its TLS certificate (RFC 2818).
Whether to verify the server's hostname against its TLS certificate (RFC 2818). When false, the client accepts any valid certificate regardless of hostname. This is insecure and should only be used for testing. Only effective for the pekko-http backend; the netty backend always verifies.
- Since
2.0.0
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)