Record Class A2AHttpClientConfiguration

java.lang.Object
java.lang.Record
org.a2aproject.sdk.client.http.A2AHttpClientConfiguration

public record A2AHttpClientConfiguration(List<String> excludedProviderNames, @Nullable SSEParserConfig sseParserConfig, @Nullable RedirectHeaderPolicy redirectHeaderPolicy) extends Record
Optional settings used by A2AHttpClientFactory when selecting and creating a client.

A provider is eligible only when it supports every configured setting. This prevents the factory from silently ignoring security or SSE parsing configuration.

  • Field Details

    • DEFAULT

      public static final A2AHttpClientConfiguration DEFAULT
      The default configuration, which selects the highest-priority available provider.
  • Constructor Details

    • A2AHttpClientConfiguration

      public A2AHttpClientConfiguration(List<String> excludedProviderNames, @Nullable SSEParserConfig sseParserConfig, @Nullable RedirectHeaderPolicy redirectHeaderPolicy)
      Creates an instance of a A2AHttpClientConfiguration record class.
      Parameters:
      excludedProviderNames - the value for the excludedProviderNames record component
      sseParserConfig - the value for the sseParserConfig record component
      redirectHeaderPolicy - the value for the redirectHeaderPolicy record component
  • Method Details

    • builder

      public static A2AHttpClientConfiguration.Builder builder()
      Returns a builder for a client configuration.
    • sseParserConfigOrDefault

      public SSEParserConfig sseParserConfigOrDefault()
      Returns the configured SSE parser limits, or the SDK defaults when none were supplied.
    • redirectHeaderPolicyOrDefault

      public RedirectHeaderPolicy redirectHeaderPolicyOrDefault()
      Returns the configured redirect policy, or the SDK default when none was supplied.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • excludedProviderNames

      public List<String> excludedProviderNames()
      Returns the value of the excludedProviderNames record component.
      Returns:
      the value of the excludedProviderNames record component
    • sseParserConfig

      public @Nullable SSEParserConfig sseParserConfig()
      Returns the value of the sseParserConfig record component.
      Returns:
      the value of the sseParserConfig record component
    • redirectHeaderPolicy

      public @Nullable RedirectHeaderPolicy redirectHeaderPolicy()
      Returns the value of the redirectHeaderPolicy record component.
      Returns:
      the value of the redirectHeaderPolicy record component