Interface ClientConfiguration


@DoNotLog @Immutable public interface ClientConfiguration
A context-independent (i.e., does not depend on configuration files or on-disk entities like JKS keystores) instantiation of a ServiceConfiguration.
  • Method Details

    • sslSocketFactory

      SSLSocketFactory sslSocketFactory()
      See PartialServiceConfiguration.security().
    • trustManager

      X509TrustManager trustManager()
      See PartialServiceConfiguration.security().
    • uris

      List<String> uris()
      See PartialServiceConfiguration.uris().
    • connectTimeout

      Duration connectTimeout()
      See PartialServiceConfiguration.connectTimeout().
    • readTimeout

      Duration readTimeout()
      See PartialServiceConfiguration.readTimeout().
    • writeTimeout

      Duration writeTimeout()
      See PartialServiceConfiguration.writeTimeout().
    • enableGcmCipherSuites

      boolean enableGcmCipherSuites()
      See PartialServiceConfiguration.enableGcmCipherSuites().
    • enableHttp2

      Optional<Boolean> enableHttp2()
      See PartialServiceConfiguration.enableHttp2().
    • fallbackToCommonNameVerification

      boolean fallbackToCommonNameVerification()
      See PartialServiceConfiguration.fallbackToCommonNameVerification().
    • proxy

      ProxySelector proxy()
      The proxy to use for the HTTP connection.
    • proxyCredentials

      Optional<com.palantir.conjure.java.api.config.service.BasicCredentials> proxyCredentials()
      The credentials to use for the proxy selected by proxy().
    • meshProxy

      Optional<com.google.common.net.HostAndPort> meshProxy()
      Clients configured with a mesh proxy send all HTTP requests to the configured proxy address instead of the configured uri; requests carry an additional Host header (or http/2 :authority pseudo-header) set to the configured uri. The proxy is expected to forward such requests to the original #uris uri.

      Note that if this option is set, then the maxNumRetries() must also be set to 0 and exactly one uris() must exist since the mesh proxy is expected to handle all retry logic.

    • maxNumRetries

      int maxNumRetries()
      The maximum number of times a failed request is retried.
    • nodeSelectionStrategy

      NodeSelectionStrategy nodeSelectionStrategy()
      Indicates how the target node is selected for a given request.
    • failedUrlCooldown

      Duration failedUrlCooldown()
      The amount of time a URL marked as failed should be avoided for subsequent calls. If the nodeSelectionStrategy() is ROUND_ROBIN, this must be a positive period of time.
    • backoffSlotSize

      Duration backoffSlotSize()
      The size of one backoff time slot for call retries. For example, an exponential backoff retry algorithm may choose a backoff time in [0, backoffSlotSize * 2^c] for the c-th retry.
    • clientQoS

      Indicates whether client-side sympathetic QoS should be enabled.
    • serverQoS

      Indicates whether QosExceptions (other than RetryOther) should be propagated.
    • retryOnTimeout

      Indicates whether timed out requests should be retried.
    • retryOnSocketException

      Indicates whether requests that resulted in a socket exception should be retried.
    • taggedMetricRegistry

      com.palantir.tritium.metrics.registry.TaggedMetricRegistry taggedMetricRegistry()
      Both per-request and global metrics are recorded in this registry.
    • userAgent

      Optional<com.palantir.conjure.java.api.config.service.UserAgent> userAgent()
      An identifier to distinguish this caller in the request logs of upstream services.
    • hostEventsSink

      Optional<HostEventsSink> hostEventsSink()
      Per-host failures are recorded using this interface.
    • check

      @Check default void check()
    • builder

      static ClientConfiguration.Builder builder()