Interface SubscribeToTaskRequestMapper

All Known Implementing Classes:
SubscribeToTaskRequestMapperImpl

public interface SubscribeToTaskRequestMapper
Mapper between SubscribeToTaskRequest and SubscribeToTaskRequest.

The mapping handles the structural difference between domain and proto representations:

  • Domain: Full JSONRPC request with id, jsonrpc, method, and params (TaskIdParams)
  • Proto: Simple request with name field in format "tasks/{task_id}"

Note: The domain object is a complete JSONRPC request, while the proto is just the gRPC request parameters. The JSONRPC envelope (id, jsonrpc, method) is handled separately by the transport layer.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    default org.a2aproject.sdk.jsonrpc.common.wrappers.SubscribeToTaskRequest
    Converts proto SubscribeToTaskRequest to domain SubscribeToTaskRequest.
    toProto(org.a2aproject.sdk.jsonrpc.common.wrappers.SubscribeToTaskRequest domain)
    Converts domain SubscribeToTaskRequest to proto SubscribeToTaskRequest.
  • Field Details

  • Method Details

    • toProto

      default SubscribeToTaskRequest toProto(org.a2aproject.sdk.jsonrpc.common.wrappers.SubscribeToTaskRequest domain)
      Converts domain SubscribeToTaskRequest to proto SubscribeToTaskRequest. Extracts the task ID from params and formats it as "tasks/{task_id}".
      Parameters:
      domain - the domain SubscribeToTaskRequest
      Returns:
      the proto SubscribeToTaskRequest
    • fromProto

      default org.a2aproject.sdk.jsonrpc.common.wrappers.SubscribeToTaskRequest fromProto(SubscribeToTaskRequest proto)
      Converts proto SubscribeToTaskRequest to domain SubscribeToTaskRequest. Extracts the task ID from the name field and creates a TaskIdParams.
      Parameters:
      proto - the proto SubscribeToTaskRequest
      Returns:
      the domain SubscribeToTaskRequest