Class MicroProfileConfigProvider

java.lang.Object
org.a2aproject.sdk.integrations.microprofile.MicroProfileConfigProvider
All Implemented Interfaces:
A2AConfigProvider

@ApplicationScoped @Alternative @Priority(50) public class MicroProfileConfigProvider extends Object implements A2AConfigProvider
MicroProfile Config-based implementation of A2AConfigProvider.

This provider integrates with MicroProfile Config (used by Quarkus and other Jakarta EE runtimes) to allow configuration via standard sources:

  • System properties (-D flags)
  • Environment variables
  • application.properties
  • Custom ConfigSources

Falls back to DefaultValuesConfigProvider when a configuration value is not found in MicroProfile Config, ensuring that default values from META-INF/a2a-defaults.properties are always available.

This provider is automatically enabled with @Priority(50), but can be overridden by custom providers with higher priority.

To use this provider, add the a2a-java-sdk-microprofile-config dependency to your project.

  • Constructor Details

    • MicroProfileConfigProvider

      public MicroProfileConfigProvider()
  • Method Details

    • getValue

      public String getValue(String name)
      Description copied from interface: A2AConfigProvider
      Get a required configuration value.
      Specified by:
      getValue in interface A2AConfigProvider
      Parameters:
      name - the configuration property name
      Returns:
      the configuration value
    • getOptionalValue

      public Optional<String> getOptionalValue(String name)
      Description copied from interface: A2AConfigProvider
      Get an optional configuration value.
      Specified by:
      getOptionalValue in interface A2AConfigProvider
      Parameters:
      name - the configuration property name
      Returns:
      an Optional containing the value if present, empty otherwise