Package dev.restate.sdk
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.-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface dev.restate.sdk.endpoint.definition.HandlerRunner
HANDLER_CONTEXT_THREAD_LOCAL -
Method Summary
Modifier and TypeMethodDescriptionstatic <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 forHandlerRunner, used by codegenstatic <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 forHandlerRunner, used by codegenstatic <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 forHandlerRunner, used by codegenstatic <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 forHandlerRunner, used by codegenCompletableFuture<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)
-
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) -
of
public static <CTX extends Context,REQ, HandlerRunner<REQ,RES> RES> of(dev.restate.common.function.ThrowingBiFunction<CTX, REQ, RES> runner, dev.restate.serde.SerdeFactory contextSerdeFactory, @Nullable HandlerRunner.Options options) Factory method forHandlerRunner, 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 forHandlerRunner, 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 forHandlerRunner, 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 forHandlerRunner, used by codegen
-