Class QuarkusGrpcTransportMetadata
java.lang.Object
org.a2aproject.sdk.server.grpc.quarkus.QuarkusGrpcTransportMetadata
- All Implemented Interfaces:
TransportMetadata
Transport metadata provider for the Quarkus gRPC reference implementation.
This class identifies the transport protocol used by the gRPC server implementation. It is automatically discovered by the A2A server framework through CDI to provide protocol-specific metadata to components that need to distinguish between different transport implementations.
CDI Integration
This bean is automatically registered and can be injected where transport protocol information is needed:
@Inject
TransportMetadata transportMetadata;
public void logProtocol() {
String protocol = transportMetadata.getTransportProtocol();
// Returns "grpc" for this implementation
}
Use Cases
- Identifying the active transport protocol in multi-transport deployments
- Conditional logic based on transport capabilities
- Logging and metrics collection with transport-specific tags
- Protocol-specific error handling or feature detection
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the transport protocol identifier for gRPC.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface TransportMetadata
isAvailable
-
Constructor Details
-
QuarkusGrpcTransportMetadata
public QuarkusGrpcTransportMetadata()
-
-
Method Details
-
getTransportProtocol
Returns the transport protocol identifier for gRPC.- Specified by:
getTransportProtocolin interfaceTransportMetadata- Returns:
- the string "grpc" identifying this transport implementation
-