ClientServiceHandle
EXPERIMENTAL API: This interface is part of the new reflection-based API and may change in future releases.
Advanced API handle for invoking Restate services, virtual objects, or workflows from the ingress (outside of a handler). This handle provides advanced invocation capabilities including:
- Async request handling with CompletableFuture
- Invocation options such as idempotency keys
- Fire-and-forget requests via
send() - Access to full Response metadata
Use this handle to perform requests with method references:
Client client = Client.connect("http://localhost:8080");
// 1. Use call() with method reference and wait for the result
Response<GreetingResponse> response = client.serviceHandle(Greeter.class)
.call(Greeter::greet, new Greeting("Alice"));
// 2. Use send() for one-way invocation without waiting
SendResponse<GreetingResponse> sendResponse = client.serviceHandle(Greeter.class)
.send(Greeter::greet, new Greeting("Alice"));
Content copied to clipboard
Create instances using serviceHandle, virtualObjectHandle, or workflowHandle.
For simple synchronous request-response interactions returning just the output, consider using the simple proxy API instead: service, virtualObject, or workflow.
Parameters
<SVC>
the service interface type
Functions
Link copied to clipboard
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
EXPERIMENTAL API: Invoke a service method with input and wait for the response.
Link copied to clipboard
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
Link copied to clipboard
EXPERIMENTAL API: Like send, for methods without input or return value.
EXPERIMENTAL API: Like send, for methods without input.
EXPERIMENTAL API: Like send, for methods without a return value.
EXPERIMENTAL API: Send a one-way invocation without waiting for the response.
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
EXPERIMENTAL API: Like send, with invocation options.
@ApiStatus.Experimental
@ApiStatus.Experimental
EXPERIMENTAL API: Like send, with a delay.
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
EXPERIMENTAL API: Like send, with a delay and invocation options.
Link copied to clipboard
EXPERIMENTAL API: Like sendAsync, for no-input/void methods.
EXPERIMENTAL API: Like sendAsync, for no-input methods.
@ApiStatus.Experimental
EXPERIMENTAL API: Like sendAsync, for void methods.
@ApiStatus.Experimental
EXPERIMENTAL API: Async version of send.
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
EXPERIMENTAL API: Like sendAsync, with options.
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
EXPERIMENTAL API: Like sendAsync, with a delay.
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
@ApiStatus.Experimental
EXPERIMENTAL API: Like sendAsync, with delay and options.