Package dev.restate.client
Interface Client.AwakeableHandle
- Enclosing interface:
Client
public static interface Client.AwakeableHandle
This class represents a handle to an Awakeable. It can be used to complete awakeables from the
ingress
-
Method Summary
Modifier and TypeMethodDescriptionComplete with failure the Awakeable.reject(String reason, RequestOptions options) Same asreject(String)with options.default CompletableFuture<Response<Void>> rejectAsync(String reason) Same asreject(String)but async.rejectAsync(String reason, RequestOptions options) Same asreject(String)but async with options.Complete with success the Awakeable.resolve(TypeTag<T> serde, @NonNull T payload, RequestOptions options) Same asresolve(TypeTag, Object)with options.Complete with success the Awakeable.resolve(Class<T> clazz, @NonNull T payload, RequestOptions options) Same asresolve(TypeTag, Object)with options.default <T> CompletableFuture<Response<Void>> resolveAsync(TypeTag<T> serde, @NonNull T payload) Same asresolve(TypeTag, Object)but async.<T> CompletableFuture<Response<Void>> resolveAsync(TypeTag<T> serde, @NonNull T payload, RequestOptions options) Same asresolve(TypeTag, Object)but async with options.default <T> CompletableFuture<Response<Void>> resolveAsync(Class<T> clazz, @NonNull T payload) Same asresolve(TypeTag, Object)but async.default <T> CompletableFuture<Response<Void>> resolveAsync(Class<T> clazz, @NonNull T payload, RequestOptions options) Same asresolve(Class, Object)but async with options.
-
Method Details
-
resolveAsync
<T> CompletableFuture<Response<Void>> resolveAsync(TypeTag<T> serde, @NonNull T payload, RequestOptions options) Same asresolve(TypeTag, Object)but async with options. -
resolveAsync
Same asresolve(TypeTag, Object)but async. -
resolve
Same asresolve(TypeTag, Object)with options. -
resolve
Complete with success the Awakeable.- Parameters:
clazz- used to serialize the Awakeable result payload.payload- the result payload. MUST NOT be null.
-
resolveAsync
default <T> CompletableFuture<Response<Void>> resolveAsync(Class<T> clazz, @NonNull T payload, RequestOptions options) Same asresolve(Class, Object)but async with options. -
resolveAsync
Same asresolve(TypeTag, Object)but async. -
resolve
Same asresolve(TypeTag, Object)with options. -
resolve
Complete with success the Awakeable.- Parameters:
serde- used to serialize the Awakeable result payload.payload- the result payload. MUST NOT be null.
-
rejectAsync
Same asreject(String)but async with options. -
rejectAsync
Same asreject(String)but async. -
reject
Same asreject(String)with options. -
reject
Complete with failure the Awakeable.- Parameters:
reason- the rejection reason. MUST NOT be null.
-