33import java .util .List ;
44import java .util .Map ;
55
6- import io .a2a .client .http .A2AHttpClient ;
76import io .a2a .spec .PushNotificationConfig ;
8- import io .grpc .Channel ;
97
108/**
119 * Configuration for the A2A client factory.
@@ -14,23 +12,21 @@ public class ClientConfig {
1412
1513 private final Boolean streaming ;
1614 private final Boolean polling ;
17- private final A2AHttpClient httpClient ;
18- private final Channel channel ;
15+ private final List <ClientTransportConfig > clientTransportConfigs ;
1916 private final List <String > supportedTransports ;
2017 private final Boolean useClientPreference ;
2118 private final List <String > acceptedOutputModes ;
2219 private final PushNotificationConfig pushNotificationConfig ;
2320 private final Integer historyLength ;
2421 private final Map <String , Object > metadata ;
2522
26- public ClientConfig (Boolean streaming , Boolean polling , A2AHttpClient httpClient , Channel channel ,
23+ public ClientConfig (Boolean streaming , Boolean polling , List < ClientTransportConfig > clientTransportConfigs ,
2724 List <String > supportedTransports , Boolean useClientPreference ,
2825 List <String > acceptedOutputModes , PushNotificationConfig pushNotificationConfig ,
2926 Integer historyLength , Map <String , Object > metadata ) {
3027 this .streaming = streaming == null ? true : streaming ;
3128 this .polling = polling == null ? false : polling ;
32- this .httpClient = httpClient ;
33- this .channel = channel ;
29+ this .clientTransportConfigs = clientTransportConfigs ;
3430 this .supportedTransports = supportedTransports ;
3531 this .useClientPreference = useClientPreference == null ? false : useClientPreference ;
3632 this .acceptedOutputModes = acceptedOutputModes ;
@@ -47,12 +43,8 @@ public boolean isPolling() {
4743 return polling ;
4844 }
4945
50- public A2AHttpClient getHttpClient () {
51- return httpClient ;
52- }
53-
54- public Channel getChannel () {
55- return channel ;
46+ public List <ClientTransportConfig > getClientTransportConfigs () {
47+ return clientTransportConfigs ;
5648 }
5749
5850 public List <String > getSupportedTransports () {
@@ -82,8 +74,7 @@ public Map<String, Object> getMetadata() {
8274 public static class Builder {
8375 private Boolean streaming ;
8476 private Boolean polling ;
85- private A2AHttpClient httpClient ;
86- private Channel channel ;
77+ private List <ClientTransportConfig > clientTransportConfigs ;
8778 private List <String > supportedTransports ;
8879 private Boolean useClientPreference ;
8980 private List <String > acceptedOutputModes ;
@@ -101,13 +92,8 @@ public Builder setPolling(Boolean polling) {
10192 return this ;
10293 }
10394
104- public Builder setHttpClient (A2AHttpClient httpClient ) {
105- this .httpClient = httpClient ;
106- return this ;
107- }
108-
109- public Builder setChannel (Channel channel ) {
110- this .channel = channel ;
95+ public Builder setClientTransportConfigs (List <ClientTransportConfig > clientTransportConfigs ) {
96+ this .clientTransportConfigs = clientTransportConfigs ;
11197 return this ;
11298 }
11399
@@ -142,7 +128,7 @@ public Builder setMetadata(Map<String, Object> metadata) {
142128 }
143129
144130 public ClientConfig build () {
145- return new ClientConfig (streaming , polling , httpClient , channel ,
131+ return new ClientConfig (streaming , polling , clientTransportConfigs ,
146132 supportedTransports , useClientPreference , acceptedOutputModes ,
147133 pushNotificationConfig , historyLength , metadata );
148134 }
0 commit comments