Package io.grpc.xds.client
Interface XdsClient.ResourceWatcher<T extends XdsClient.ResourceUpdate>
- All Known Implementing Classes:
CdsLoadBalancer2.CdsLbState.ClusterState,ClusterResolverLoadBalancer.ClusterResolverLbState.EdsClusterState,XdsNameResolver.ResolveState,XdsNameResolver.ResolveState.RouteDiscoveryState,XdsServerWrapper.DiscoveryState,XdsServerWrapper.DiscoveryState.RouteDiscoveryState
- Enclosing class:
XdsClient
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/10862")
public static interface XdsClient.ResourceWatcher<T extends XdsClient.ResourceUpdate>
Watcher interface for a single requested xDS resource.
-
Method Summary
Modifier and TypeMethodDescriptionvoidvoidonError(io.grpc.Status error) Called when the resource discovery RPC encounters some transient error.voidonResourceDoesNotExist(String resourceName) Called when the requested resource is not available.
-
Method Details
-
onError
void onError(io.grpc.Status error) Called when the resource discovery RPC encounters some transient error.Note that we expect that the implementer to: - Comply with the guarantee to not generate certain statuses by the library: https://grpc.github.io/grpc/core/md_doc_statuscodes.html. If the code needs to be propagated to the channel, override it with
Status.Code.UNAVAILABLE. - KeepStatusdescription in one form or another, as it contains valuable debugging information. -
onResourceDoesNotExist
Called when the requested resource is not available.- Parameters:
resourceName- name of the resource requested in discovery request.
-
onChanged
-