Package dev.restate.common
Interface Request<Req,Res>
- Type Parameters:
Req- the request typeRes- the response type
- All Known Subinterfaces:
RequestBuilder<Req,,Res> WorkflowRequest<Req,,Res> WorkflowRequestBuilder<Req,Res>
public interface Request<Req,Res>
Interface encapsulating request parameters.
-
Method Summary
Modifier and TypeMethodDescription@Nullable Stringstatic RequestBuilder<byte[], byte[]> static <Req,Res> RequestBuilder <Req, Res>
-
Method Details
-
of
static <Req,Res> RequestBuilder<Req,Res> of(Target target, TypeTag<Req> reqTypeTag, TypeTag<Res> resTypeTag, Req request) Create a newRequestBuilderfor the givenTarget, request and responseTypeTagandrequestobject.When using the annotation processor, you can rely on the generated
Handlersclass, instead of manually using this builder. For example, for a service class nameGreeter, the corresponding class where all the requests builders are available is namedGreeterHandlers -
of
Create a newRequestBuilderfor the givenTargetandrequestbyte array.When using the annotation processor, you can rely on the generated
Handlersclass, instead of manually using this builder. For example, for a service class nameGreeter, the corresponding class where all the requests builders are available is namedGreeterHandlers -
getTarget
Target getTarget()- Returns:
- the request target
-
getRequestTypeTag
- Returns:
- the request type tag
-
getResponseTypeTag
- Returns:
- the response type tag
-
getRequest
Req getRequest()- Returns:
- the request object
-
getIdempotencyKey
@Nullable String getIdempotencyKey()- Returns:
- the idempotency key
-
getHeaders
- Returns:
- the request headers
-