Class ClientOperations
java.lang.Object
com.mulesoft.connectors.a2a.internal.client.operation.ClientOperations
@Throws({BasicOperationErrorTypeProvider.class,JsonRpcErrorTypeProvider.class})
public class ClientOperations
extends Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcancelTask(A2AClient client, InputStream taskId, RequestParameterGroup requestParameters, org.mule.sdk.api.runtime.source.DistributedTraceContextManager traceContextManager, org.mule.runtime.extension.api.runtime.process.CompletionCallback<String, ResponseAttributes> completionCallback) voiddeletePushNotificationConfig(A2AClient client, InputStream getPushConfigParams, RequestParameterGroup requestParameters, org.mule.sdk.api.runtime.source.DistributedTraceContextManager traceContextManager, org.mule.runtime.extension.api.runtime.process.CompletionCallback<String, ResponseAttributes> completionCallback) voidgetCard(A2AClient client, boolean useExtendedCard, RequestParameterGroup requestParameters, org.mule.sdk.api.runtime.source.DistributedTraceContextManager traceContextManager, org.mule.runtime.extension.api.runtime.process.CompletionCallback<String, ResponseAttributes> completionCallback) voidgetPushNotificationConfig(A2AClient client, InputStream getPushConfigParams, RequestParameterGroup requestParameters, org.mule.sdk.api.runtime.source.DistributedTraceContextManager traceContextManager, org.mule.runtime.extension.api.runtime.process.CompletionCallback<String, ResponseAttributes> completionCallback) voidgetTask(A2AClient client, InputStream taskQuery, RequestParameterGroup requestParameters, org.mule.sdk.api.runtime.source.DistributedTraceContextManager traceContextManager, org.mule.runtime.extension.api.runtime.process.CompletionCallback<String, ResponseAttributes> completionCallback) voidlistPushNotificationConfigs(A2AClient client, InputStream getPushConfigParams, RequestParameterGroup requestParameters, org.mule.sdk.api.runtime.source.DistributedTraceContextManager traceContextManager, org.mule.runtime.extension.api.runtime.process.CompletionCallback<String, ResponseAttributes> completionCallback) voidsendMessage(A2AClient client, InputStream message, RequestParameterGroup requestParameters, org.mule.sdk.api.runtime.source.DistributedTraceContextManager traceContextManager, org.mule.runtime.extension.api.runtime.process.CompletionCallback<String, ResponseAttributes> completionCallback) voidsendStreamMessage(A2AClient client, InputStream streamMessage, RequestParameterGroup requestParameters, org.mule.sdk.api.runtime.source.DistributedTraceContextManager traceContextManager, TaskStatusUpdateRoute onTaskStatusUpdate, TaskArtifactUpdateRoute onTaskArtifactUpdate, org.mule.runtime.extension.api.runtime.process.CompletionCallback<String, StreamingResponseAttributes> completionCallback) Sends a message to the A2A agent and establishes an SSE streaming connection to receive real-time status updates, artifacts, and error notifications as the agent processes the request.voidsetPushNotificationConfig(A2AClient client, InputStream taskPushNotificationConfig, RequestParameterGroup requestParameters, org.mule.sdk.api.runtime.source.DistributedTraceContextManager traceContextManager, org.mule.runtime.extension.api.runtime.process.CompletionCallback<String, ResponseAttributes> completionCallback) voidtaskResubscribe(A2AClient client, InputStream taskIdParams, RequestParameterGroup requestParameters, org.mule.sdk.api.runtime.source.DistributedTraceContextManager traceContextManager, TaskStatusUpdateRoute onTaskStatusUpdate, TaskArtifactUpdateRoute onTaskArtifactUpdate, org.mule.runtime.extension.api.runtime.process.CompletionCallback<String, StreamingResponseAttributes> completionCallback) Reconnects to an existing SSE streaming session for an ongoing task to receive buffered events and continue receiving real-time updates from where the connection was lost.
-
Constructor Details
-
ClientOperations
public ClientOperations()
-
-
Method Details
-
getCard
@DisplayName("A2A Client - Get Card") @Throws({AgentCardErrorTypeProvider.class,BasicOperationErrorTypeProvider.class}) public void getCard(@Connection A2AClient client, @Optional(defaultValue="false") @DisplayName("Use Extended Card") @Summary("When true, fetches the authenticated extended agent card instead of the normal agent card") boolean useExtendedCard, @ParameterGroup(name="Request") RequestParameterGroup requestParameters, org.mule.sdk.api.runtime.source.DistributedTraceContextManager traceContextManager, org.mule.runtime.extension.api.runtime.process.CompletionCallback<String, ResponseAttributes> completionCallback) -
sendMessage
@DisplayName("A2A Client - Send Message") public void sendMessage(@Connection A2AClient client, @Content InputStream message, @ParameterGroup(name="Request") RequestParameterGroup requestParameters, org.mule.sdk.api.runtime.source.DistributedTraceContextManager traceContextManager, org.mule.runtime.extension.api.runtime.process.CompletionCallback<String, ResponseAttributes> completionCallback) -
getTask
@DisplayName("A2A Client - Get Task") public void getTask(@Connection A2AClient client, @Content InputStream taskQuery, @ParameterGroup(name="Request") RequestParameterGroup requestParameters, org.mule.sdk.api.runtime.source.DistributedTraceContextManager traceContextManager, org.mule.runtime.extension.api.runtime.process.CompletionCallback<String, ResponseAttributes> completionCallback) -
cancelTask
@DisplayName("A2A Client - Cancel Task") public void cancelTask(@Connection A2AClient client, @Content InputStream taskId, @ParameterGroup(name="Request") RequestParameterGroup requestParameters, org.mule.sdk.api.runtime.source.DistributedTraceContextManager traceContextManager, org.mule.runtime.extension.api.runtime.process.CompletionCallback<String, ResponseAttributes> completionCallback) -
listPushNotificationConfigs
@DisplayName("A2A Client - List Push Notification Configs") @Throws({PushNotificationErrorTypeProvider.class,BasicOperationErrorTypeProvider.class,JsonRpcErrorTypeProvider.class}) public void listPushNotificationConfigs(@Connection A2AClient client, @Content InputStream getPushConfigParams, @ParameterGroup(name="Request") RequestParameterGroup requestParameters, org.mule.sdk.api.runtime.source.DistributedTraceContextManager traceContextManager, org.mule.runtime.extension.api.runtime.process.CompletionCallback<String, ResponseAttributes> completionCallback) -
getPushNotificationConfig
@DisplayName("A2A Client - Get Push Notification Config") @Throws({PushNotificationErrorTypeProvider.class,BasicOperationErrorTypeProvider.class,JsonRpcErrorTypeProvider.class}) public void getPushNotificationConfig(@Connection A2AClient client, @Content InputStream getPushConfigParams, @ParameterGroup(name="Request") RequestParameterGroup requestParameters, org.mule.sdk.api.runtime.source.DistributedTraceContextManager traceContextManager, org.mule.runtime.extension.api.runtime.process.CompletionCallback<String, ResponseAttributes> completionCallback) -
deletePushNotificationConfig
@DisplayName("A2A Client - Delete Push Notification Config") @Throws({PushNotificationErrorTypeProvider.class,BasicOperationErrorTypeProvider.class,JsonRpcErrorTypeProvider.class}) public void deletePushNotificationConfig(@Connection A2AClient client, @Content InputStream getPushConfigParams, @ParameterGroup(name="Request") RequestParameterGroup requestParameters, org.mule.sdk.api.runtime.source.DistributedTraceContextManager traceContextManager, org.mule.runtime.extension.api.runtime.process.CompletionCallback<String, ResponseAttributes> completionCallback) -
setPushNotificationConfig
@DisplayName("A2A Client - Set Push Notification Config") @Throws({PushNotificationErrorTypeProvider.class,BasicOperationErrorTypeProvider.class,JsonRpcErrorTypeProvider.class}) public void setPushNotificationConfig(@Connection A2AClient client, @Content InputStream taskPushNotificationConfig, @ParameterGroup(name="Request") RequestParameterGroup requestParameters, org.mule.sdk.api.runtime.source.DistributedTraceContextManager traceContextManager, org.mule.runtime.extension.api.runtime.process.CompletionCallback<String, ResponseAttributes> completionCallback) -
sendStreamMessage
@DisplayName("A2A Client - Send Stream Message") @Throws({StreamingErrorTypeProvider.class,BasicOperationErrorTypeProvider.class,JsonRpcErrorTypeProvider.class}) public void sendStreamMessage(@Connection A2AClient client, @Content InputStream streamMessage, @ParameterGroup(name="Request") RequestParameterGroup requestParameters, org.mule.sdk.api.runtime.source.DistributedTraceContextManager traceContextManager, @Optional @DisplayName("On Task Status Update") @ExecutionOccurrence(MULTIPLE_OR_NONE) @ChainInputResolver(TaskStatusUpdateChainInputTypeResolver.class) TaskStatusUpdateRoute onTaskStatusUpdate, @Optional @DisplayName("On Task Artifact Update") @ExecutionOccurrence(MULTIPLE_OR_NONE) @ChainInputResolver(TaskArtifactUpdateChainInputTypeResolver.class) TaskArtifactUpdateRoute onTaskArtifactUpdate, org.mule.runtime.extension.api.runtime.process.CompletionCallback<String, StreamingResponseAttributes> completionCallback) Sends a message to the A2A agent and establishes an SSE streaming connection to receive real-time status updates, artifacts, and error notifications as the agent processes the request.- Parameters:
client- the A2A client connectionstreamMessage- the message to send (MessageSendParams schema)requestParameters- additional request configurationtraceContextManager- distributed tracing contextonTaskStatusUpdate- callback for status updatesonTaskArtifactUpdate- callback for artifact updatescompletionCallback- Mule framework callback
-
taskResubscribe
@DisplayName("A2A Client - Task Resubscribe") @Summary("Reconnect to an ongoing task to receive missed events and resume real-time updates") @Throws({StreamingErrorTypeProvider.class,BasicOperationErrorTypeProvider.class,JsonRpcErrorTypeProvider.class}) public void taskResubscribe(@Connection A2AClient client, @Content InputStream taskIdParams, @ParameterGroup(name="Request") RequestParameterGroup requestParameters, org.mule.sdk.api.runtime.source.DistributedTraceContextManager traceContextManager, @Optional @DisplayName("On Task Status Update") @ExecutionOccurrence(MULTIPLE_OR_NONE) @ChainInputResolver(TaskStatusUpdateChainInputTypeResolver.class) TaskStatusUpdateRoute onTaskStatusUpdate, @Optional @DisplayName("On Task Artifact Update") @ExecutionOccurrence(MULTIPLE_OR_NONE) @ChainInputResolver(TaskArtifactUpdateChainInputTypeResolver.class) TaskArtifactUpdateRoute onTaskArtifactUpdate, org.mule.runtime.extension.api.runtime.process.CompletionCallback<String, StreamingResponseAttributes> completionCallback) Reconnects to an existing SSE streaming session for an ongoing task to receive buffered events and continue receiving real-time updates from where the connection was lost.- Parameters:
client- the A2A client connectiontaskIdParams- the task ID to resubscribe to (TaskIdParams schema)requestParameters- additional request configurationtraceContextManager- distributed tracing contextonTaskStatusUpdate- callback for status updatesonTaskArtifactUpdate- callback for artifact updatescompletionCallback- Mule framework callback
-