Package io.a2a.client.transport.jsonrpc
Class JSONRPCTransport
java.lang.Object
io.a2a.client.transport.jsonrpc.JSONRPCTransport
- All Implemented Interfaces:
ClientTransport
-
Constructor Summary
ConstructorsConstructorDescriptionJSONRPCTransport(A2AHttpClient httpClient, AgentCard agentCard, String agentUrl, List<ClientCallInterceptor> interceptors) JSONRPCTransport(AgentCard agentCard) JSONRPCTransport(String agentUrl) -
Method Summary
Modifier and TypeMethodDescriptioncancelTask(TaskIdParams request, ClientCallContext context) voidclose()voiddeleteTaskPushNotificationConfigurations(DeleteTaskPushNotificationConfigParams request, ClientCallContext context) getAgentCard(ClientCallContext context) getTask(TaskQueryParams request, ClientCallContext context) getTaskPushNotificationConfiguration(GetTaskPushNotificationConfigParams request, ClientCallContext context) listTaskPushNotificationConfigurations(ListTaskPushNotificationConfigParams request, ClientCallContext context) voidresubscribe(TaskIdParams request, Consumer<StreamingEventKind> eventConsumer, Consumer<Throwable> errorConsumer, ClientCallContext context) sendMessage(MessageSendParams request, ClientCallContext context) voidsendMessageStreaming(MessageSendParams request, Consumer<StreamingEventKind> eventConsumer, Consumer<Throwable> errorConsumer, ClientCallContext context) setTaskPushNotificationConfiguration(TaskPushNotificationConfig request, ClientCallContext context)
-
Constructor Details
-
JSONRPCTransport
-
JSONRPCTransport
-
JSONRPCTransport
public JSONRPCTransport(A2AHttpClient httpClient, AgentCard agentCard, String agentUrl, List<ClientCallInterceptor> interceptors)
-
-
Method Details
-
sendMessage
public EventKind sendMessage(MessageSendParams request, ClientCallContext context) throws A2AClientException - Specified by:
sendMessagein interfaceClientTransport- Throws:
A2AClientException
-
sendMessageStreaming
public void sendMessageStreaming(MessageSendParams request, Consumer<StreamingEventKind> eventConsumer, Consumer<Throwable> errorConsumer, ClientCallContext context) throws A2AClientException - Specified by:
sendMessageStreamingin interfaceClientTransport- Throws:
A2AClientException
-
getTask
- Specified by:
getTaskin interfaceClientTransport- Throws:
A2AClientException
-
cancelTask
- Specified by:
cancelTaskin interfaceClientTransport- Throws:
A2AClientException
-
setTaskPushNotificationConfiguration
public TaskPushNotificationConfig setTaskPushNotificationConfiguration(TaskPushNotificationConfig request, ClientCallContext context) throws A2AClientException - Specified by:
setTaskPushNotificationConfigurationin interfaceClientTransport- Throws:
A2AClientException
-
getTaskPushNotificationConfiguration
public TaskPushNotificationConfig getTaskPushNotificationConfiguration(GetTaskPushNotificationConfigParams request, ClientCallContext context) throws A2AClientException - Specified by:
getTaskPushNotificationConfigurationin interfaceClientTransport- Throws:
A2AClientException
-
listTaskPushNotificationConfigurations
public List<TaskPushNotificationConfig> listTaskPushNotificationConfigurations(ListTaskPushNotificationConfigParams request, ClientCallContext context) throws A2AClientException - Specified by:
listTaskPushNotificationConfigurationsin interfaceClientTransport- Throws:
A2AClientException
-
deleteTaskPushNotificationConfigurations
public void deleteTaskPushNotificationConfigurations(DeleteTaskPushNotificationConfigParams request, ClientCallContext context) throws A2AClientException - Specified by:
deleteTaskPushNotificationConfigurationsin interfaceClientTransport- Throws:
A2AClientException
-
resubscribe
public void resubscribe(TaskIdParams request, Consumer<StreamingEventKind> eventConsumer, Consumer<Throwable> errorConsumer, ClientCallContext context) throws A2AClientException - Specified by:
resubscribein interfaceClientTransport- Throws:
A2AClientException
-
getAgentCard
- Specified by:
getAgentCardin interfaceClientTransport- Throws:
A2AClientException
-
close
public void close()- Specified by:
closein interfaceClientTransport
-