Interface Request<Req,Res>

Type Parameters:
Req - the request type
Res - 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 Details

    • of

      static <Req, Res> RequestBuilder<Req,Res> of(Target target, TypeTag<Req> reqTypeTag, TypeTag<Res> resTypeTag, Req request)
      Create a new RequestBuilder for the given Target, request and response TypeTag and request object.

      When using the annotation processor, you can rely on the generated Handlers class, instead of manually using this builder. For example, for a service class name Greeter, the corresponding class where all the requests builders are available is named GreeterHandlers

    • of

      static RequestBuilder<byte[],byte[]> of(Target target, byte[] request)
      Create a new RequestBuilder for the given Target and request byte array.

      When using the annotation processor, you can rely on the generated Handlers class, instead of manually using this builder. For example, for a service class name Greeter, the corresponding class where all the requests builders are available is named GreeterHandlers

    • getTarget

      Target getTarget()
      Returns:
      the request target
    • getRequestTypeTag

      TypeTag<Req> getRequestTypeTag()
      Returns:
      the request type tag
    • getResponseTypeTag

      TypeTag<Res> getResponseTypeTag()
      Returns:
      the response type tag
    • getRequest

      Req getRequest()
      Returns:
      the request object
    • getIdempotencyKey

      @Nullable String getIdempotencyKey()
      Returns:
      the idempotency key
    • getHeaders

      @Nullable Map<String,String> getHeaders()
      Returns:
      the request headers