Class A2AServiceGrpc.A2AServiceBlockingV2Stub

java.lang.Object
io.grpc.stub.AbstractStub<A2AServiceGrpc.A2AServiceBlockingV2Stub>
io.grpc.stub.AbstractBlockingStub<A2AServiceGrpc.A2AServiceBlockingV2Stub>
org.a2aproject.sdk.compat03.grpc.A2AServiceGrpc.A2AServiceBlockingV2Stub
Enclosing class:
A2AServiceGrpc

public static final class A2AServiceGrpc.A2AServiceBlockingV2Stub extends io.grpc.stub.AbstractBlockingStub<A2AServiceGrpc.A2AServiceBlockingV2Stub>
A stub to allow clients to do synchronous rpc calls to service A2AService.
A2AService defines the gRPC version of the A2A protocol. This has a slightly
different shape than the JSONRPC version to better conform to AIP-127,
where appropriate. The nouns are AgentCard, Message, Task and
TaskPushNotificationConfig.
- Messages are not a standard resource so there is no get/delete/update/list
  interface, only a send and stream custom methods.
- Tasks have a get interface and custom cancel and subscribe methods.
- TaskPushNotificationConfig are a resource whose parent is a task.
  They have get, list and create methods.
- AgentCard is a static resource with only a get method.
fields are not present as they don't comply with AIP rules, and the
optional history_length on the get task method is not present as it also
violates AIP-127 and AIP-131.
  • Method Details

    • build

      protected A2AServiceGrpc.A2AServiceBlockingV2Stub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
      Specified by:
      build in class io.grpc.stub.AbstractStub<A2AServiceGrpc.A2AServiceBlockingV2Stub>
    • sendMessage

      public SendMessageResponse sendMessage(SendMessageRequest request) throws io.grpc.StatusException
      Send a message to the agent. This is a blocking call that will return the
      task once it is completed, or a LRO if requested.
      
      Throws:
      io.grpc.StatusException
    • sendStreamingMessage

      @ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918") public io.grpc.stub.BlockingClientCall<?, StreamResponse> sendStreamingMessage(SendMessageRequest request)
      SendStreamingMessage is a streaming call that will return a stream of
      task update events until the Task is in an interrupted or terminal state.
      
    • getTask

      public Task getTask(GetTaskRequest request) throws io.grpc.StatusException
      Get the current state of a task from the agent.
      
      Throws:
      io.grpc.StatusException
    • cancelTask

      public Task cancelTask(CancelTaskRequest request) throws io.grpc.StatusException
      Cancel a task from the agent. If supported one should expect no
      more task updates for the task.
      
      Throws:
      io.grpc.StatusException
    • taskSubscription

      @ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918") public io.grpc.stub.BlockingClientCall<?, StreamResponse> taskSubscription(TaskSubscriptionRequest request)
      TaskSubscription is a streaming call that will return a stream of task
      update events. This attaches the stream to an existing in process task.
      If the task is complete the stream will return the completed task (like
      GetTask) and close the stream.
      
    • createTaskPushNotificationConfig

      public TaskPushNotificationConfig createTaskPushNotificationConfig(CreateTaskPushNotificationConfigRequest request) throws io.grpc.StatusException
      Set a push notification config for a task.
      
      Throws:
      io.grpc.StatusException
    • getTaskPushNotificationConfig

      public TaskPushNotificationConfig getTaskPushNotificationConfig(GetTaskPushNotificationConfigRequest request) throws io.grpc.StatusException
      Get a push notification config for a task.
      
      Throws:
      io.grpc.StatusException
    • listTaskPushNotificationConfig

      public ListTaskPushNotificationConfigResponse listTaskPushNotificationConfig(ListTaskPushNotificationConfigRequest request) throws io.grpc.StatusException
      Get a list of push notifications configured for a task.
      
      Throws:
      io.grpc.StatusException
    • getAgentCard

      public AgentCard getAgentCard(GetAgentCardRequest request) throws io.grpc.StatusException
      GetAgentCard returns the agent card for the agent.
      
      Throws:
      io.grpc.StatusException
    • deleteTaskPushNotificationConfig

      public com.google.protobuf.Empty deleteTaskPushNotificationConfig(DeleteTaskPushNotificationConfigRequest request) throws io.grpc.StatusException
      Delete a push notification config for a task.
      
      Throws:
      io.grpc.StatusException