Package dev.restate.sdk.client
Class DefaultClient
java.lang.Object
dev.restate.sdk.client.DefaultClient
- All Implemented Interfaces:
Client
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.restate.sdk.client.Client
Client.AwakeableHandle, Client.IdempotentInvocationHandle<Res>, Client.InvocationHandle<Res>, Client.WorkflowHandle<Res>
-
Method Summary
Modifier and TypeMethodDescriptionCreate a newClient.AwakeableHandle
for the provided identifier.<Req,
Res> CompletableFuture <Res> callAsync
(Target target, Serde<Req> reqSerde, Serde<Res> resSerde, Req req, RequestOptions requestOptions) <Res> Client.IdempotentInvocationHandle
<Res> idempotentInvocationHandle
(Target target, String idempotencyKey, Serde<Res> resSerde) <Res> Client.InvocationHandle
<Res> invocationHandle
(String invocationId, Serde<Res> resSerde) static DefaultClient
<Req> CompletableFuture
<SendResponse> sendAsync
(Target target, Serde<Req> reqSerde, Req req, Duration delay, RequestOptions options) <Res> Client.WorkflowHandle
<Res> workflowHandle
(String workflowName, String workflowId, Serde<Res> resSerde)
-
Method Details
-
callAsync
public <Req,Res> CompletableFuture<Res> callAsync(Target target, Serde<Req> reqSerde, Serde<Res> resSerde, Req req, RequestOptions requestOptions) -
sendAsync
public <Req> CompletableFuture<SendResponse> sendAsync(Target target, Serde<Req> reqSerde, Req req, Duration delay, RequestOptions options) -
awakeableHandle
Description copied from interface:Client
Create a newClient.AwakeableHandle
for the provided identifier. You can use it toClient.AwakeableHandle.resolve(Serde, Object)
orClient.AwakeableHandle.reject(String)
an Awakeable from the ingress.- Specified by:
awakeableHandle
in interfaceClient
-
invocationHandle
public <Res> Client.InvocationHandle<Res> invocationHandle(String invocationId, Serde<Res> resSerde) - Specified by:
invocationHandle
in interfaceClient
-
idempotentInvocationHandle
public <Res> Client.IdempotentInvocationHandle<Res> idempotentInvocationHandle(Target target, String idempotencyKey, Serde<Res> resSerde) - Specified by:
idempotentInvocationHandle
in interfaceClient
-
workflowHandle
public <Res> Client.WorkflowHandle<Res> workflowHandle(String workflowName, String workflowId, Serde<Res> resSerde) - Specified by:
workflowHandle
in interfaceClient
-
of
-