Class A2AServiceGrpc.A2AServiceStub

java.lang.Object
io.grpc.stub.AbstractStub<S>
io.grpc.stub.AbstractAsyncStub<A2AServiceGrpc.A2AServiceStub>
org.a2aproject.sdk.compat03.grpc.A2AServiceGrpc.A2AServiceStub
Enclosing class:
A2AServiceGrpc

public static final class A2AServiceGrpc.A2AServiceStub extends io.grpc.stub.AbstractAsyncStub<A2AServiceGrpc.A2AServiceStub>
A stub to allow clients to do asynchronous 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.A2AServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
      Specified by:
      build in class io.grpc.stub.AbstractStub<A2AServiceGrpc.A2AServiceStub>
    • sendMessage

      public void sendMessage(SendMessageRequest request, io.grpc.stub.StreamObserver<SendMessageResponse> responseObserver)
       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.
       
    • sendStreamingMessage

      public void sendStreamingMessage(SendMessageRequest request, io.grpc.stub.StreamObserver<StreamResponse> responseObserver)
       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 void getTask(GetTaskRequest request, io.grpc.stub.StreamObserver<Task> responseObserver)
       Get the current state of a task from the agent.
       
    • cancelTask

      public void cancelTask(CancelTaskRequest request, io.grpc.stub.StreamObserver<Task> responseObserver)
       Cancel a task from the agent. If supported one should expect no
       more task updates for the task.
       
    • taskSubscription

      public void taskSubscription(TaskSubscriptionRequest request, io.grpc.stub.StreamObserver<StreamResponse> responseObserver)
       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 void createTaskPushNotificationConfig(CreateTaskPushNotificationConfigRequest request, io.grpc.stub.StreamObserver<TaskPushNotificationConfig> responseObserver)
       Set a push notification config for a task.
       
    • getTaskPushNotificationConfig

      public void getTaskPushNotificationConfig(GetTaskPushNotificationConfigRequest request, io.grpc.stub.StreamObserver<TaskPushNotificationConfig> responseObserver)
       Get a push notification config for a task.
       
    • listTaskPushNotificationConfig

      public void listTaskPushNotificationConfig(ListTaskPushNotificationConfigRequest request, io.grpc.stub.StreamObserver<ListTaskPushNotificationConfigResponse> responseObserver)
       Get a list of push notifications configured for a task.
       
    • getAgentCard

      public void getAgentCard(GetAgentCardRequest request, io.grpc.stub.StreamObserver<AgentCard> responseObserver)
       GetAgentCard returns the agent card for the agent.
       
    • deleteTaskPushNotificationConfig

      public void deleteTaskPushNotificationConfig(DeleteTaskPushNotificationConfigRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)
       Delete a push notification config for a task.