Package io.grpc.xds
Enum RouterFilter
- java.lang.Object
-
- java.lang.Enum<RouterFilter>
-
- io.grpc.xds.RouterFilter
-
- All Implemented Interfaces:
Filter
,Filter.ClientInterceptorBuilder
,Filter.ServerInterceptorBuilder
,java.io.Serializable
,java.lang.Comparable<RouterFilter>
enum RouterFilter extends java.lang.Enum<RouterFilter> implements Filter, Filter.ClientInterceptorBuilder, Filter.ServerInterceptorBuilder
Router filter implementation. Currently this filter does not parse any field in the config.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.grpc.xds.Filter
Filter.ClientInterceptorBuilder, Filter.FilterConfig, Filter.NamedFilterConfig, Filter.ServerInterceptorBuilder
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
-
Field Summary
Fields Modifier and Type Field Description (package private) static Filter.FilterConfig
ROUTER_CONFIG
(package private) static java.lang.String
TYPE_URL
-
Constructor Summary
Constructors Modifier Constructor Description private
RouterFilter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description io.grpc.ClientInterceptor
buildClientInterceptor(Filter.FilterConfig config, Filter.FilterConfig overrideConfig, io.grpc.LoadBalancer.PickSubchannelArgs args, java.util.concurrent.ScheduledExecutorService scheduler)
io.grpc.ServerInterceptor
buildServerInterceptor(Filter.FilterConfig config, Filter.FilterConfig overrideConfig)
ConfigOrError<? extends Filter.FilterConfig>
parseFilterConfig(com.google.protobuf.Message rawProtoMessage)
Parses the top-level filter config from raw proto message.ConfigOrError<? extends Filter.FilterConfig>
parseFilterConfigOverride(com.google.protobuf.Message rawProtoMessage)
Parses the per-filter override filter config from raw proto message.java.lang.String[]
typeUrls()
The proto message types supported by this filter.static RouterFilter
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static RouterFilter[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final RouterFilter INSTANCE
-
-
Field Detail
-
TYPE_URL
static final java.lang.String TYPE_URL
- See Also:
- Constant Field Values
-
ROUTER_CONFIG
static final Filter.FilterConfig ROUTER_CONFIG
-
-
Method Detail
-
values
public static RouterFilter[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (RouterFilter c : RouterFilter.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static RouterFilter valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
typeUrls
public java.lang.String[] typeUrls()
Description copied from interface:Filter
The proto message types supported by this filter. A filter will be registered by each of its supported message types.
-
parseFilterConfig
public ConfigOrError<? extends Filter.FilterConfig> parseFilterConfig(com.google.protobuf.Message rawProtoMessage)
Description copied from interface:Filter
Parses the top-level filter config from raw proto message. The message may be either aAny
or aStruct
.- Specified by:
parseFilterConfig
in interfaceFilter
-
parseFilterConfigOverride
public ConfigOrError<? extends Filter.FilterConfig> parseFilterConfigOverride(com.google.protobuf.Message rawProtoMessage)
Description copied from interface:Filter
Parses the per-filter override filter config from raw proto message. The message may be either aAny
or aStruct
.- Specified by:
parseFilterConfigOverride
in interfaceFilter
-
buildClientInterceptor
@Nullable public io.grpc.ClientInterceptor buildClientInterceptor(Filter.FilterConfig config, @Nullable Filter.FilterConfig overrideConfig, io.grpc.LoadBalancer.PickSubchannelArgs args, java.util.concurrent.ScheduledExecutorService scheduler)
- Specified by:
buildClientInterceptor
in interfaceFilter.ClientInterceptorBuilder
-
buildServerInterceptor
@Nullable public io.grpc.ServerInterceptor buildServerInterceptor(Filter.FilterConfig config, @Nullable Filter.FilterConfig overrideConfig)
- Specified by:
buildServerInterceptor
in interfaceFilter.ServerInterceptorBuilder
-
-