Package dev.restate.client
Interface Client
- All Known Implementing Classes:
BaseClient
,JdkClient
public interface Client
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
This class represents a handle to an Awakeable.static interface
static interface
static interface
-
Method Summary
Modifier and TypeMethodDescriptionCreate a newClient.AwakeableHandle
for the provided identifier.default <Req,
Res> Response <Res> <Req,
Res> CompletableFuture <Response<Res>> static Client
Create a default JDK client.static Client
connect
(String baseUri, RequestOptions options) Create a default JDK client.static Client
connect
(String baseUri, SerdeFactory serdeFactory) Create a default JDK client.static Client
connect
(String baseUri, SerdeFactory serdeFactory, RequestOptions options) Create a default JDK client.<Res> Client.IdempotentInvocationHandle
<Res> idempotentInvocationHandle
(Target target, String idempotencyKey, TypeTag<Res> resSerde) default <Res> Client.IdempotentInvocationHandle
<Res> idempotentInvocationHandle
(Target target, String idempotencyKey, Class<Res> clazz) <Res> Client.InvocationHandle
<Res> invocationHandle
(String invocationId, TypeTag<Res> resSerde) default <Res> Client.InvocationHandle
<Res> invocationHandle
(String invocationId, Class<Res> clazz) default <Req,
Res> SendResponse <Res> default <Req,
Res> SendResponse <Res> default <Req,
Res> CompletableFuture <SendResponse<Res>> <Req,
Res> CompletableFuture <SendResponse<Res>> default <Req,
Res> SendResponse <Res> submit
(WorkflowRequest<Req, Res> request) default <Req,
Res> SendResponse <Res> submit
(WorkflowRequest<Req, Res> request, @Nullable Duration delay) default <Req,
Res> CompletableFuture <SendResponse<Res>> submitAsync
(WorkflowRequest<Req, Res> request) default <Req,
Res> CompletableFuture <SendResponse<Res>> submitAsync
(WorkflowRequest<Req, Res> request, @Nullable Duration delay) <Res> Client.WorkflowHandle
<Res> workflowHandle
(String workflowName, String workflowId, TypeTag<Res> resSerde) default <Res> Client.WorkflowHandle
<Res> workflowHandle
(String workflowName, String workflowId, Class<Res> clazz)
-
Method Details
-
callAsync
-
call
- Throws:
IngressException
-
sendAsync
-
send
- Throws:
IngressException
-
sendAsync
<Req,Res> CompletableFuture<SendResponse<Res>> sendAsync(Request<Req, Res> request, @Nullable Duration delay) -
send
default <Req,Res> SendResponse<Res> send(Request<Req, Res> request, @Nullable Duration delay) throws IngressException- Throws:
IngressException
-
submitAsync
default <Req,Res> CompletableFuture<SendResponse<Res>> submitAsync(WorkflowRequest<Req, Res> request) -
submit
default <Req,Res> SendResponse<Res> submit(WorkflowRequest<Req, Res> request) throws IngressException- Throws:
IngressException
-
submitAsync
default <Req,Res> CompletableFuture<SendResponse<Res>> submitAsync(WorkflowRequest<Req, Res> request, @Nullable Duration delay) -
submit
default <Req,Res> SendResponse<Res> submit(WorkflowRequest<Req, Res> request, @Nullable Duration delay) throws IngressException- Throws:
IngressException
-
awakeableHandle
Create a newClient.AwakeableHandle
for the provided identifier. You can use it toClient.AwakeableHandle.resolve(TypeTag, Object)
orClient.AwakeableHandle.reject(String)
an Awakeable from the ingress. -
invocationHandle
-
invocationHandle
-
idempotentInvocationHandle
<Res> Client.IdempotentInvocationHandle<Res> idempotentInvocationHandle(Target target, String idempotencyKey, TypeTag<Res> resSerde) -
idempotentInvocationHandle
default <Res> Client.IdempotentInvocationHandle<Res> idempotentInvocationHandle(Target target, String idempotencyKey, Class<Res> clazz) -
workflowHandle
<Res> Client.WorkflowHandle<Res> workflowHandle(String workflowName, String workflowId, TypeTag<Res> resSerde) -
workflowHandle
default <Res> Client.WorkflowHandle<Res> workflowHandle(String workflowName, String workflowId, Class<Res> clazz) -
connect
Create a default JDK client.- Parameters:
baseUri
- uri to connect to.
-
connect
Create a default JDK client.- Parameters:
baseUri
- uri to connect tooptions
- default options to use in all the requests.
-
connect
Create a default JDK client.- Parameters:
baseUri
- uri to connect toserdeFactory
- Serde factory to use. If you're just wrapping this client in a code-generated client, you don't need to provide this parameter.
-
connect
Create a default JDK client.- Parameters:
baseUri
- uri to connect toserdeFactory
- Serde factory to use. If you're just wrapping this client in a code-generated client, you don't need to provide this parameter.options
- default options to use in all the requests.
-