Package com.zb.mom.ww.mxgateway.client
Class MxGatewayClientOptions
java.lang.Object
com.zb.mom.ww.mxgateway.client.MxGatewayClientOptions
Immutable configuration for
MxGatewayClient and
GalaxyRepositoryClient.
Captures the gateway endpoint, API key, transport security selection and
call/stream timeouts. Instances are constructed via builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionapiKey()Returns the configured API key, or an empty string if none was supplied.builder()Returns a fresh builder with default timeouts and no endpoint set.Returns the configured CA certificate file used to verify the gateway, ornullwhen the platform trust store is used.Returns the per-call deadline applied to unary RPCs.Returns the channel connect timeout.endpoint()Returns the configured gRPC target endpoint.intbooleanReturns whether the client is configured to use plaintext transport.Returns the API key with the body redacted, safe to write to logs.booleanReturns whether TLS certificate verification is required even when no CA is pinned.Returns the TLS server-name override, or an empty string when none was supplied.Returns the deadline applied to server-streaming RPCs, ornullwhen none is set.toString()
-
Method Details
-
builder
Returns a fresh builder with default timeouts and no endpoint set.- Returns:
- a new
MxGatewayClientOptions.Builder
-
endpoint
Returns the configured gRPC target endpoint.- Returns:
- the endpoint string in
host:portor DNS-target form
-
apiKey
Returns the configured API key, or an empty string if none was supplied.- Returns:
- the raw API key
-
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:
truefor plaintext,falsefor TLS
-
caCertificatePath
Returns the configured CA certificate file used to verify the gateway, ornullwhen 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. Whenfalse(default), the gateway's self-signed certificate is accepted without verification. Whentrue, the OS trust store is used. Pinning a CA viacaCertificatePath()always verifies regardless of this flag.- Returns:
trueif strict certificate verification is required
-
serverNameOverride
Returns the TLS server-name override, or an empty string when none was supplied.- Returns:
- the server-name override
-
connectTimeout
Returns the channel connect timeout.- Returns:
- the connect timeout duration
-
callTimeout
Returns the per-call deadline applied to unary RPCs.- Returns:
- the call timeout duration
-
streamTimeout
Returns the deadline applied to server-streaming RPCs, ornullwhen none is set.- Returns:
- the stream timeout duration, or
null
-
maxGrpcMessageBytes
public int maxGrpcMessageBytes() -
toString
-