Class MxGatewayClientOptions

java.lang.Object
com.zb.mom.ww.mxgateway.client.MxGatewayClientOptions

public final class MxGatewayClientOptions extends Object
Immutable configuration for MxGatewayClient and GalaxyRepositoryClient.

Captures the gateway endpoint, API key, transport security selection and call/stream timeouts. Instances are constructed via builder().

  • Method Details

    • builder

      public static MxGatewayClientOptions.Builder builder()
      Returns a fresh builder with default timeouts and no endpoint set.
      Returns:
      a new MxGatewayClientOptions.Builder
    • endpoint

      public String endpoint()
      Returns the configured gRPC target endpoint.
      Returns:
      the endpoint string in host:port or DNS-target form
    • apiKey

      public String apiKey()
      Returns the configured API key, or an empty string if none was supplied.
      Returns:
      the raw API key
    • redactedApiKey

      public String redactedApiKey()
      Returns the API key with the body redacted, safe to write to logs.
      Returns:
      the redacted form produced by MxGatewaySecrets.redactApiKey(String)
    • plaintext

      public boolean plaintext()
      Returns whether the client is configured to use plaintext transport.
      Returns:
      true for plaintext, false for TLS
    • caCertificatePath

      public Path caCertificatePath()
      Returns the configured CA certificate file used to verify the gateway, or null when the platform trust store is used.
      Returns:
      the CA certificate path, or null
    • requireCertificateValidation

      public boolean requireCertificateValidation()
      Returns whether TLS certificate verification is required even when no CA is pinned. When false (default), the gateway's self-signed certificate is accepted without verification. When true, the OS trust store is used. Pinning a CA via caCertificatePath() always verifies regardless of this flag.
      Returns:
      true if strict certificate verification is required
    • serverNameOverride

      public String serverNameOverride()
      Returns the TLS server-name override, or an empty string when none was supplied.
      Returns:
      the server-name override
    • connectTimeout

      public Duration connectTimeout()
      Returns the channel connect timeout.
      Returns:
      the connect timeout duration
    • callTimeout

      public Duration callTimeout()
      Returns the per-call deadline applied to unary RPCs.
      Returns:
      the call timeout duration
    • streamTimeout

      public Duration streamTimeout()
      Returns the deadline applied to server-streaming RPCs, or null when none is set.
      Returns:
      the stream timeout duration, or null
    • maxGrpcMessageBytes

      public int maxGrpcMessageBytes()
    • toString

      public String toString()
      Overrides:
      toString in class Object