Interface A2AHttpClientProvider

All Known Implementing Classes:
AndroidA2AHttpClientProvider, JdkA2AHttpClientProvider, VertxA2AHttpClientProvider

public interface A2AHttpClientProvider
Service provider interface for creating A2AHttpClient instances.

Implementations of this interface can be registered via the Java ServiceLoader mechanism. The A2AHttpClientFactory will discover and use the highest priority provider available.

To register a provider, create a file named META-INF/services/org.a2aproject.sdk.client.http.A2AHttpClientProvider containing the fully qualified class name of your provider implementation.

  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a new instance of an A2AHttpClient.
    Returns the name of this provider for logging and debugging purposes.
    default int
    Returns the priority of this provider.
  • Method Details

    • create

      A2AHttpClient create()
      Creates a new instance of an A2AHttpClient.
      Returns:
      a new A2AHttpClient instance
    • priority

      default int priority()
      Returns the priority of this provider. Higher priority providers are preferred over lower priority ones.

      Default priorities:

      • JdkA2AHttpClient: 0 (fallback)
      • VertxA2AHttpClient: 100 (preferred when available)
      Returns:
      the priority value (higher is better)
    • name

      String name()
      Returns the name of this provider for logging and debugging purposes.
      Returns:
      the provider name