Package org.a2aproject.sdk.server
Class AgentCardValidator
java.lang.Object
org.a2aproject.sdk.server.AgentCardValidator
Validates AgentCard transport configuration against available transport endpoints.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ConcurrentMap<AgentCard,Boolean> Creates a cache whose entries represent completed successful validation.static voidvalidateOnce(AgentCard card, ConcurrentMap<AgentCard, Boolean> cache, Consumer<AgentCard> validator) Waits for validation of the same card and leaves failures uncached so they can be retried.static voidvalidateTransportConfiguration(AgentCard agentCard) Validates the transport configuration of an AgentCard against available transports found on the classpath.
-
Field Details
-
SKIP_PROPERTY
- See Also:
-
SKIP_JSONRPC_PROPERTY
- See Also:
-
SKIP_GRPC_PROPERTY
- See Also:
-
SKIP_REST_PROPERTY
- See Also:
-
-
Constructor Details
-
AgentCardValidator
public AgentCardValidator()
-
-
Method Details
-
newValidatedCardsMap
Creates a cache whose entries represent completed successful validation. -
validateOnce
public static void validateOnce(AgentCard card, ConcurrentMap<AgentCard, Boolean> cache, Consumer<AgentCard> validator) Waits for validation of the same card and leaves failures uncached so they can be retried. -
validateTransportConfiguration
Validates the transport configuration of an AgentCard against available transports found on the classpath. Logs warnings for missing transports and errors for unsupported transports.- Parameters:
agentCard- the agent card to validate
-