Package dev.restate.sdk
Class HandlerRunner<REQ,RES>
java.lang.Object
dev.restate.sdk.HandlerRunner<REQ,RES>
- All Implemented Interfaces:
HandlerRunner<REQ,
RES, HandlerRunner.Options>
public class HandlerRunner<REQ,RES>
extends Object
implements HandlerRunner<REQ,RES,HandlerRunner.Options>
Adapter class for
HandlerRunner
to use the Java API.-
Nested Class Summary
-
Field Summary
Fields inherited from interface dev.restate.sdk.common.syscalls.HandlerRunner
SYSCALLS_THREAD_LOCAL
-
Method Summary
Modifier and TypeMethodDescriptionstatic <CTX extends Context,
REQ>
HandlerRunner<REQ, Void> of
(ThrowingBiConsumer<CTX, REQ> runner) static <CTX extends Context,
REQ, RES>
HandlerRunner<REQ, RES> of
(ThrowingBiFunction<CTX, REQ, RES> runner) static <CTX extends Context>
HandlerRunner<Void, Void> of
(ThrowingConsumer<CTX> runner) static <CTX extends Context,
RES>
HandlerRunner<Void, RES> of
(ThrowingFunction<CTX, RES> runner) void
run
(HandlerSpecification<REQ, RES> handlerSpecification, Syscalls syscalls, @Nullable HandlerRunner.Options options, SyscallCallback<ByteBuffer> callback)
-
Method Details
-
run
public void run(HandlerSpecification<REQ, RES> handlerSpecification, Syscalls syscalls, @Nullable HandlerRunner.Options options, SyscallCallback<ByteBuffer> callback) - Specified by:
run
in interfaceHandlerRunner<REQ,
RES, HandlerRunner.Options>
-
of
public static <CTX extends Context,REQ, HandlerRunner<REQ,RES> RES> of(ThrowingBiFunction<CTX, REQ, RES> runner) -
of
public static <CTX extends Context,RES> HandlerRunner<Void,RES> of(ThrowingFunction<CTX, RES> runner) -
of
public static <CTX extends Context,REQ> HandlerRunner<REQ,Void> of(ThrowingBiConsumer<CTX, REQ> runner) -
of
-