Interface TransportWrapper<T,R>
- All Known Implementing Classes:
JsonRpcTransportWrapper
public interface TransportWrapper<T,R>
The interface for different A2A transports, such as `JSON-RPC`, `GRPC`, `REST` and other custom transports to
separate the access requests and handle requests.
Developers should get request body and headers from request by endpoint(Controller, Route, StreamObserver and so on), then call target implementation of this interface to actual handle target transport.
-
Method Summary
-
Method Details
-
getTransportType
String getTransportType()Get wrapper transport type name.- Returns:
- name of transport type
-
handleRequest
Do handle for target transport request, including streaming and non-streaming request.- Parameters:
body- transport request bodyheaders- transport request headers mapmetadata- Other transport request metadata from request or developer- Returns:
- Different response for different transport request
-