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 Summary
Constructors -
Method Summary
-
Constructor Details
-
MicroProfileConfigProvider
public MicroProfileConfigProvider()
-
-
Method Details
-
getValue
Description copied from interface:A2AConfigProviderGet a required configuration value.- Specified by:
getValuein interfaceA2AConfigProvider- Parameters:
name- the configuration property name- Returns:
- the configuration value
-
getOptionalValue
Description copied from interface:A2AConfigProviderGet an optional configuration value.- Specified by:
getOptionalValuein interfaceA2AConfigProvider- Parameters:
name- the configuration property name- Returns:
- an Optional containing the value if present, empty otherwise
-