Package io.grpc.xds
Class XdsNameResolver.ResolveState.RouteDiscoveryState
java.lang.Object
io.grpc.xds.XdsNameResolver.ResolveState.RouteDiscoveryState
- All Implemented Interfaces:
XdsClient.ResourceWatcher<XdsRouteConfigureResource.RdsUpdate>
- Enclosing class:
XdsNameResolver.ResolveState
private class XdsNameResolver.ResolveState.RouteDiscoveryState
extends Object
implements XdsClient.ResourceWatcher<XdsRouteConfigureResource.RdsUpdate>
Discovery state for RouteConfiguration resource. One instance for each Listener resource
update.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List
<Filter.NamedFilterConfig> private final long
private final String
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
RouteDiscoveryState
(String resourceName, long httpMaxStreamDurationNano, List<Filter.NamedFilterConfig> filterConfigs) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
onError
(io.grpc.Status error) Called when the resource discovery RPC encounters some transient error.void
onResourceDoesNotExist
(String resourceName) Called when the requested resource is not available.
-
Field Details
-
resourceName
-
httpMaxStreamDurationNano
private final long httpMaxStreamDurationNano -
filterConfigs
-
-
Constructor Details
-
RouteDiscoveryState
private RouteDiscoveryState(String resourceName, long httpMaxStreamDurationNano, @Nullable List<Filter.NamedFilterConfig> filterConfigs)
-
-
Method Details
-
onChanged
- Specified by:
onChanged
in interfaceXdsClient.ResourceWatcher<XdsRouteConfigureResource.RdsUpdate>
-
onError
public void onError(io.grpc.Status error) Description copied from interface:XdsClient.ResourceWatcher
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
. - KeepStatus
description in one form or another, as it contains valuable debugging information.- Specified by:
onError
in interfaceXdsClient.ResourceWatcher<XdsRouteConfigureResource.RdsUpdate>
-
onResourceDoesNotExist
Description copied from interface:XdsClient.ResourceWatcher
Called when the requested resource is not available.- Specified by:
onResourceDoesNotExist
in interfaceXdsClient.ResourceWatcher<XdsRouteConfigureResource.RdsUpdate>
- Parameters:
resourceName
- name of the resource requested in discovery request.
-