Class GetTaskResponse
java.lang.Object
org.a2aproject.sdk.jsonrpc.common.wrappers.A2AResponse<Task>
org.a2aproject.sdk.jsonrpc.common.wrappers.GetTaskResponse
- All Implemented Interfaces:
A2AMessage
JSON-RPC response containing requested task information.
This response returns the full Task object for a task ID queried via
GetTaskRequest, including all task metadata, status, artifacts, and messages.
If the task is not found or an error occurs, the error field will be populated with
a A2AError (typically TaskNotFoundError) instead of a result.
-
Field Summary
Fields inherited from class org.a2aproject.sdk.jsonrpc.common.wrappers.A2AResponse
error, id, jsonrpc, resultFields inherited from interface org.a2aproject.sdk.jsonrpc.common.wrappers.A2AMessage
JSONRPC_VERSION -
Constructor Summary
ConstructorsConstructorDescriptionGetTaskResponse(Object id, A2AError error) Constructs error response.GetTaskResponse(Object id, Task result) Constructs successful response.GetTaskResponse(String jsonrpc, Object id, Task result, A2AError error) Constructs response with full parameters. -
Method Summary
Methods inherited from class org.a2aproject.sdk.jsonrpc.common.wrappers.A2AResponse
getError, getId, getJsonrpc, getResult
-
Constructor Details
-
GetTaskResponse
Constructs response with full parameters.- Parameters:
jsonrpc- the JSON-RPC versionid- the request IDresult- the task resulterror- the error if any
-
GetTaskResponse
Constructs error response.- Parameters:
id- the request IDerror- the error
-
GetTaskResponse
Constructs successful response.- Parameters:
id- the request IDresult- the task result
-