Class Registry

java.lang.Object
io.superdurable.dex.Registry

public final class Registry extends Object
Validates and indexes the Flow definitions shared by a client or worker.

Construct a registry once after assembling all application Flow instances. Construction fails early for duplicate Flow types, Step types, RPC names, or persistence definition names; invalid start-Step typing; missing definitions; unsupported RPC signatures; unregistered locks or transition targets; and final RPC classes or methods. RPC classes must be non-final so the client can create strongly typed stubs; Kotlin users must mark those classes and methods open.

Registry registry = new Registry(Arrays.<Flow<?>>asList(
        new OrderFlow(),
        new BillingFlow()));
  • Constructor Details

    • Registry

      public Registry(List<Flow<?>> flows)
      Builds and validates a registry from application Flow instances.
      Parameters:
      flows - the nonnull Flow instances available to clients and workers
      Throws:
      IllegalArgumentException - if the list or any Flow definition violates the registry contract