Package io.grpc.xds
Class FilterChainMatchingProtocolNegotiators.FilterChainMatchingHandler.FilterChainSelector
- java.lang.Object
-
- io.grpc.xds.FilterChainMatchingProtocolNegotiators.FilterChainMatchingHandler.FilterChainSelector
-
- Enclosing class:
- FilterChainMatchingProtocolNegotiators.FilterChainMatchingHandler
static final class FilterChainMatchingProtocolNegotiators.FilterChainMatchingHandler.FilterChainSelector extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.atomic.AtomicReference<XdsServerWrapper.ServerRoutingConfig>
defaultRoutingConfig
private SslContextProviderSupplier
defaultSslContextProviderSupplier
static FilterChainMatchingProtocolNegotiators.FilterChainMatchingHandler.FilterChainSelector
NO_FILTER_CHAIN
private java.util.Map<EnvoyServerProtoData.FilterChain,java.util.concurrent.atomic.AtomicReference<XdsServerWrapper.ServerRoutingConfig>>
routingConfigs
-
Constructor Summary
Constructors Constructor Description FilterChainSelector(java.util.Map<EnvoyServerProtoData.FilterChain,java.util.concurrent.atomic.AtomicReference<XdsServerWrapper.ServerRoutingConfig>> routingConfigs, SslContextProviderSupplier defaultSslContextProviderSupplier, java.util.concurrent.atomic.AtomicReference<XdsServerWrapper.ServerRoutingConfig> defaultRoutingConfig)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.util.Collection<EnvoyServerProtoData.FilterChain>
filterOnApplicationProtocols(java.util.Collection<EnvoyServerProtoData.FilterChain> filterChains)
private static java.util.Collection<EnvoyServerProtoData.FilterChain>
filterOnDestinationPort(java.util.Collection<EnvoyServerProtoData.FilterChain> filterChains)
private static java.util.Collection<EnvoyServerProtoData.FilterChain>
filterOnIpAddress(java.util.Collection<EnvoyServerProtoData.FilterChain> filterChains, java.net.InetAddress address, boolean forDestination)
private static java.util.Collection<EnvoyServerProtoData.FilterChain>
filterOnServerNames(java.util.Collection<EnvoyServerProtoData.FilterChain> filterChains)
private static java.util.Collection<EnvoyServerProtoData.FilterChain>
filterOnSourcePort(java.util.Collection<EnvoyServerProtoData.FilterChain> filterChains, int sourcePort)
private static java.util.Collection<EnvoyServerProtoData.FilterChain>
filterOnSourceType(java.util.Collection<EnvoyServerProtoData.FilterChain> filterChains, java.net.InetAddress sourceAddress, java.net.InetAddress destAddress)
private static java.util.Collection<EnvoyServerProtoData.FilterChain>
filterOnTransportProtocol(java.util.Collection<EnvoyServerProtoData.FilterChain> filterChains)
(package private) java.util.concurrent.atomic.AtomicReference<XdsServerWrapper.ServerRoutingConfig>
getDefaultRoutingConfig()
(package private) SslContextProviderSupplier
getDefaultSslContextProviderSupplier()
private static int
getMatchingPrefixLength(EnvoyServerProtoData.FilterChainMatch filterChainMatch, java.net.InetAddress address, boolean forDestination)
(package private) java.util.Map<EnvoyServerProtoData.FilterChain,java.util.concurrent.atomic.AtomicReference<XdsServerWrapper.ServerRoutingConfig>>
getRoutingConfigs()
(package private) FilterChainMatchingProtocolNegotiators.SelectedConfig
select(java.net.InetSocketAddress localAddr, java.net.InetSocketAddress remoteAddr)
Throws IllegalStateException when no exact one match, and we should close the connection.java.lang.String
toString()
-
-
-
Field Detail
-
NO_FILTER_CHAIN
public static final FilterChainMatchingProtocolNegotiators.FilterChainMatchingHandler.FilterChainSelector NO_FILTER_CHAIN
-
routingConfigs
private final java.util.Map<EnvoyServerProtoData.FilterChain,java.util.concurrent.atomic.AtomicReference<XdsServerWrapper.ServerRoutingConfig>> routingConfigs
-
defaultSslContextProviderSupplier
@Nullable private final SslContextProviderSupplier defaultSslContextProviderSupplier
-
defaultRoutingConfig
private final java.util.concurrent.atomic.AtomicReference<XdsServerWrapper.ServerRoutingConfig> defaultRoutingConfig
-
-
Constructor Detail
-
FilterChainSelector
FilterChainSelector(java.util.Map<EnvoyServerProtoData.FilterChain,java.util.concurrent.atomic.AtomicReference<XdsServerWrapper.ServerRoutingConfig>> routingConfigs, @Nullable SslContextProviderSupplier defaultSslContextProviderSupplier, java.util.concurrent.atomic.AtomicReference<XdsServerWrapper.ServerRoutingConfig> defaultRoutingConfig)
-
-
Method Detail
-
getRoutingConfigs
java.util.Map<EnvoyServerProtoData.FilterChain,java.util.concurrent.atomic.AtomicReference<XdsServerWrapper.ServerRoutingConfig>> getRoutingConfigs()
-
getDefaultRoutingConfig
java.util.concurrent.atomic.AtomicReference<XdsServerWrapper.ServerRoutingConfig> getDefaultRoutingConfig()
-
getDefaultSslContextProviderSupplier
SslContextProviderSupplier getDefaultSslContextProviderSupplier()
-
select
FilterChainMatchingProtocolNegotiators.SelectedConfig select(java.net.InetSocketAddress localAddr, java.net.InetSocketAddress remoteAddr)
Throws IllegalStateException when no exact one match, and we should close the connection.
-
filterOnApplicationProtocols
private static java.util.Collection<EnvoyServerProtoData.FilterChain> filterOnApplicationProtocols(java.util.Collection<EnvoyServerProtoData.FilterChain> filterChains)
-
filterOnTransportProtocol
private static java.util.Collection<EnvoyServerProtoData.FilterChain> filterOnTransportProtocol(java.util.Collection<EnvoyServerProtoData.FilterChain> filterChains)
-
filterOnServerNames
private static java.util.Collection<EnvoyServerProtoData.FilterChain> filterOnServerNames(java.util.Collection<EnvoyServerProtoData.FilterChain> filterChains)
-
filterOnDestinationPort
private static java.util.Collection<EnvoyServerProtoData.FilterChain> filterOnDestinationPort(java.util.Collection<EnvoyServerProtoData.FilterChain> filterChains)
-
filterOnSourcePort
private static java.util.Collection<EnvoyServerProtoData.FilterChain> filterOnSourcePort(java.util.Collection<EnvoyServerProtoData.FilterChain> filterChains, int sourcePort)
-
filterOnSourceType
private static java.util.Collection<EnvoyServerProtoData.FilterChain> filterOnSourceType(java.util.Collection<EnvoyServerProtoData.FilterChain> filterChains, java.net.InetAddress sourceAddress, java.net.InetAddress destAddress)
-
getMatchingPrefixLength
private static int getMatchingPrefixLength(EnvoyServerProtoData.FilterChainMatch filterChainMatch, java.net.InetAddress address, boolean forDestination)
-
filterOnIpAddress
private static java.util.Collection<EnvoyServerProtoData.FilterChain> filterOnIpAddress(java.util.Collection<EnvoyServerProtoData.FilterChain> filterChains, java.net.InetAddress address, boolean forDestination)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-