Class ClientOptions

java.lang.Object
io.superdurable.dex.ClientOptions

public final class ClientOptions extends Object
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);
  • Constructor Details

    • ClientOptions

      public ClientOptions()
      Creates options for localhost:8801 with the default Jackson mapper.
    • ClientOptions

      public ClientOptions(String serverAddress)
      Creates options for a Dex server with default worker routing and serialization.
      Parameters:
      serverAddress - the gRPC target understood by ManagedChannelBuilder
    • ClientOptions

      public ClientOptions(String serverAddress, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
      Creates options with explicit transport and serialization settings.
      Parameters:
      serverAddress - the Dex gRPC target
      objectMapper - the nonnull Jackson mapper used for application values
      Throws:
      IllegalArgumentException - if objectMapper is null
  • Method Details

    • newBuilder

      public static ClientOptions.Builder newBuilder()
      Creates a builder with local development defaults.

      Use the builder to attach a Credential without 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