Package org.a2aproject.sdk.compat03.grpc
Class A2AServiceGrpc.A2AServiceBlockingV2Stub
java.lang.Object
io.grpc.stub.AbstractStub<S>
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class io.grpc.stub.AbstractStub
io.grpc.stub.AbstractStub.StubFactory<T extends io.grpc.stub.AbstractStub<T>> -
Method Summary
Modifier and TypeMethodDescriptionprotected A2AServiceGrpc.A2AServiceBlockingV2Stubbuild(io.grpc.Channel channel, io.grpc.CallOptions callOptions) cancelTask(CancelTaskRequest request) Cancel a task from the agent.Set a push notification config for a task.com.google.protobuf.EmptyDelete a push notification config for a task.getAgentCard(GetAgentCardRequest request) GetAgentCard returns the agent card for the agent.getTask(GetTaskRequest request) Get the current state of a task from the agent.Get a push notification config for a task.Get a list of push notifications configured for a task.sendMessage(SendMessageRequest request) Send a message to the agent.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.io.grpc.stub.BlockingClientCall<?,StreamResponse> taskSubscription(TaskSubscriptionRequest request) TaskSubscription is a streaming call that will return a stream of task update events.Methods inherited from class io.grpc.stub.AbstractBlockingStub
newStub, newStubMethods inherited from class io.grpc.stub.AbstractStub
getCallOptions, getChannel, withCallCredentials, withChannel, withCompression, withDeadline, withDeadlineAfter, withDeadlineAfter, withExecutor, withInterceptors, withMaxInboundMessageSize, withMaxOutboundMessageSize, withOnReadyThreshold, withOption, withWaitForReady
-
Method Details
-
build
protected A2AServiceGrpc.A2AServiceBlockingV2Stub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) - Specified by:
buildin classio.grpc.stub.AbstractStub<A2AServiceGrpc.A2AServiceBlockingV2Stub>
-
sendMessage
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
Get the current state of a task from the agent.
- Throws:
io.grpc.StatusException
-
cancelTask
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
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
-