Package io.grpc.xds
Interface XdsClient.ResourceWatcher<T extends XdsClient.ResourceUpdate>
-
- 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonChanged(T update)voidonError(io.grpc.Status error)Called when the resource discovery RPC encounters some transient error.voidonResourceDoesNotExist(java.lang.String resourceName)Called when the requested resource is not available.
-
-
-
Method Detail
-
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
void onResourceDoesNotExist(java.lang.String resourceName)
Called when the requested resource is not available.- Parameters:
resourceName- name of the resource requested in discovery request.
-
onChanged
void onChanged(T update)
-
-