Class ClientOptions
java.lang.Object
io.superdurable.dex.ClientOptions
Configures a synchronous
Client connection and value mapper.
The client connects to the Dex server over plaintext gRPC. Its default server address is
localhost:8801. Flow invocations route to pull Workers automatically.
The default Jackson mapper discovers installed modules; pass a configured mapper when
application values require custom serialization.
A credential sends a bearer token with each FlowService call. By default no token is sent.
ClientOptions options = new ClientOptions(
"dex.example.com:8801",
applicationObjectMapper);
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds immutable Client options. -
Constructor Summary
ConstructorsConstructorDescriptionCreates options forlocalhost:8801with the default Jackson mapper.ClientOptions(String serverAddress) Creates options for a Dex server with default worker routing and serialization.ClientOptions(String serverAddress, com.fasterxml.jackson.databind.ObjectMapper objectMapper) Creates options with explicit transport and serialization settings. -
Method Summary
Modifier and TypeMethodDescriptionstatic ClientOptions.BuilderCreates a builder with local development defaults.
-
Constructor Details
-
ClientOptions
public ClientOptions()Creates options forlocalhost:8801with the default Jackson mapper. -
ClientOptions
Creates options for a Dex server with default worker routing and serialization.- Parameters:
serverAddress- the gRPC target understood byManagedChannelBuilder
-
ClientOptions
public ClientOptions(String serverAddress, com.fasterxml.jackson.databind.ObjectMapper objectMapper) Creates options with explicit transport and serialization settings.- Parameters:
serverAddress- the Dex gRPC targetobjectMapper- the nonnull Jackson mapper used for application values- Throws:
IllegalArgumentException- ifobjectMapperisnull
-
-
Method Details
-
newBuilder
Creates a builder with local development defaults.Use the builder to attach a
Credentialwithout changing existing constructor call sites. No credential is sent unless one is configured.ClientOptions options = ClientOptions.newBuilder() .serverAddress("dex:8801") .credential(new FileCredential("/var/run/secrets/dex/token")) .build();- Returns:
- a new mutable builder
-