Class AgentCardResolver

java.lang.Object
org.a2aproject.sdk.server.AgentCardResolver

public final class AgentCardResolver extends Object
Selects request and discovery cards independently of transport validation.
  • Method Details

    • of

      public static AgentCardResolver of(Supplier<@Nullable AgentCard> publicCard, Supplier<@Nullable AgentCard> extendedCard, @Nullable AgentCardRouter router)
    • resolveEffectiveCard

      public AgentCard resolveEffectiveCard(@Nullable String tenant)
      Selects public then extended cards, never using defaults for a routed nonblank tenant.
    • resolvePublicDiscoveryCard

      public @Nullable AgentCard resolvePublicDiscoveryCard(@Nullable String tenant)
      Selects public cards only; extended cards are never exposed through public discovery.
    • resolveExtendedDiscoveryCard

      public @Nullable AgentCard resolveExtendedDiscoveryCard(@Nullable String tenant)
      Selects a routed extended card for nonblank tenants and the default extended card otherwise.
    • normalizeTenantForResolution

      public static @Nullable String normalizeTenantForResolution(@Nullable String tenant)
      Validates a tenant and removes its optional boundary slashes; blank denotes the default tenant.