Skip to content

Commit f6d9221

Browse files
authored
xds: hide TlsContextManager in XdsResourceType.Args (#10894)
1 parent 4f7ec13 commit f6d9221

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

xds/src/main/java/io/grpc/xds/XdsListenerResource.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ private LdsUpdate processServerSideListener(Listener proto, Args args)
130130
if (args.bootstrapInfo != null && args.bootstrapInfo.certProviders() != null) {
131131
certProviderInstances = args.bootstrapInfo.certProviders().keySet();
132132
}
133-
return LdsUpdate.forTcpListener(parseServerSideListener(proto, args.tlsContextManager,
133+
return LdsUpdate.forTcpListener(parseServerSideListener(proto,
134+
(TlsContextManager) args.securityConfig,
134135
filterRegistry, certProviderInstances));
135136
}
136137

xds/src/main/java/io/grpc/xds/XdsResourceType.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,13 @@ public abstract class XdsResourceType<T extends ResourceUpdate> {
8585
// the resources that need an update.
8686
protected abstract boolean isFullStateOfTheWorld();
8787

88+
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/10847")
8889
public static class Args {
8990
final ServerInfo serverInfo;
9091
final String versionInfo;
9192
final String nonce;
9293
final Bootstrapper.BootstrapInfo bootstrapInfo;
93-
final TlsContextManager tlsContextManager;
94+
final Object securityConfig;
9495
// Management server is required to always send newly requested resources, even if they
9596
// may have been sent previously (proactively). Thus, client does not need to cache
9697
// unrequested resources.
@@ -99,17 +100,18 @@ public static class Args {
99100

100101
public Args(ServerInfo serverInfo, String versionInfo, String nonce,
101102
Bootstrapper.BootstrapInfo bootstrapInfo,
102-
TlsContextManager tlsContextManager,
103+
Object securityConfig,
103104
@Nullable Set<String> subscribedResources) {
104105
this.serverInfo = serverInfo;
105106
this.versionInfo = versionInfo;
106107
this.nonce = nonce;
107108
this.bootstrapInfo = bootstrapInfo;
108-
this.tlsContextManager = tlsContextManager;
109+
this.securityConfig = securityConfig;
109110
this.subscribedResources = subscribedResources;
110111
}
111112
}
112113

114+
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/10847")
113115
public static final class ResourceInvalidException extends Exception {
114116
private static final long serialVersionUID = 0L;
115117

0 commit comments

Comments
 (0)