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 java.lang.Object implements XdsClient.ResourceWatcher<XdsRouteConfigureResource.RdsUpdate>
Discovery state for RouteConfiguration resource. One instance for each Listener resource update.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<Filter.NamedFilterConfig>
filterConfigs
private long
httpMaxStreamDurationNano
private java.lang.String
resourceName
-
Constructor Summary
Constructors Modifier Constructor Description private
RouteDiscoveryState(java.lang.String resourceName, long httpMaxStreamDurationNano, java.util.List<Filter.NamedFilterConfig> filterConfigs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onChanged(XdsRouteConfigureResource.RdsUpdate update)
void
onError(io.grpc.Status error)
Called when the resource discovery RPC encounters some transient error.void
onResourceDoesNotExist(java.lang.String resourceName)
Called when the requested resource is not available.
-
-
-
Field Detail
-
resourceName
private final java.lang.String resourceName
-
httpMaxStreamDurationNano
private final long httpMaxStreamDurationNano
-
filterConfigs
@Nullable private final java.util.List<Filter.NamedFilterConfig> filterConfigs
-
-
Constructor Detail
-
RouteDiscoveryState
private RouteDiscoveryState(java.lang.String resourceName, long httpMaxStreamDurationNano, @Nullable java.util.List<Filter.NamedFilterConfig> filterConfigs)
-
-
Method Detail
-
onChanged
public void onChanged(XdsRouteConfigureResource.RdsUpdate update)
- 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
public void onResourceDoesNotExist(java.lang.String resourceName)
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.
-
-