Class HandlerRunner<REQ,RES>

java.lang.Object
dev.restate.sdk.HandlerRunner<REQ,RES>
All Implemented Interfaces:
dev.restate.sdk.endpoint.definition.HandlerRunner<REQ,RES>

public class HandlerRunner<REQ,RES> extends Object implements dev.restate.sdk.endpoint.definition.HandlerRunner<REQ,RES>
Adapter class for HandlerRunner to use the Java API.
  • Method Details

    • run

      public CompletableFuture<dev.restate.common.Slice> run(dev.restate.sdk.endpoint.definition.HandlerContext handlerContext, dev.restate.serde.Serde<REQ> requestSerde, dev.restate.serde.Serde<RES> responseSerde, AtomicReference<Runnable> onClosedInvocationStreamHook)
      Specified by:
      run in interface dev.restate.sdk.endpoint.definition.HandlerRunner<REQ,RES>
    • of

      public static <CTX extends Context, REQ, RES> HandlerRunner<REQ,RES> of(dev.restate.common.function.ThrowingBiFunction<CTX,REQ,RES> runner, dev.restate.serde.SerdeFactory contextSerdeFactory, @Nullable HandlerRunner.Options options)
      Factory method for HandlerRunner, used by codegen
    • of

      public static <CTX extends Context, RES> HandlerRunner<Void,RES> of(dev.restate.common.function.ThrowingFunction<CTX,RES> runner, dev.restate.serde.SerdeFactory contextSerdeFactory, @Nullable HandlerRunner.Options options)
      Factory method for HandlerRunner, used by codegen
    • of

      public static <CTX extends Context, REQ> HandlerRunner<REQ,Void> of(dev.restate.common.function.ThrowingBiConsumer<CTX,REQ> runner, dev.restate.serde.SerdeFactory contextSerdeFactory, @Nullable HandlerRunner.Options options)
      Factory method for HandlerRunner, used by codegen
    • of

      public static <CTX extends Context> HandlerRunner<Void,Void> of(dev.restate.common.function.ThrowingConsumer<CTX> runner, dev.restate.serde.SerdeFactory contextSerdeFactory, @Nullable HandlerRunner.Options options)
      Factory method for HandlerRunner, used by codegen