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 Details

  • Method Details

    • toProto

      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

      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