Package com.netflix.zuul.netty.server
Class BaseZuulChannelInitializer
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.ChannelInitializer<io.netty.channel.Channel>
com.netflix.zuul.netty.server.BaseZuulChannelInitializer
- All Implemented Interfaces:
io.netty.channel.ChannelHandler
,io.netty.channel.ChannelInboundHandler
- Direct Known Subclasses:
Http1MutualSslChannelInitializer
,Http2SslChannelInitializer
,PushChannelInitializer
,ZuulServerChannelInitializer
public abstract class BaseZuulChannelInitializer
extends io.netty.channel.ChannelInitializer<io.netty.channel.Channel>
User: Mike Smith
Date: 3/5/16
Time: 6:26 PM
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AccessLogPublisher
static final io.netty.util.AttributeKey<ChannelConfig>
protected final ChannelConfig
protected final ChannelConfig
protected final io.netty.channel.group.ChannelGroup
A collection of all the active channels that we can use to things like graceful shutdownprotected final int
protected final FilterLoader
protected final FilterUsageNotifier
static final String
protected final HttpMetricsChannelHandler
protected final int
protected final com.netflix.spectator.api.Counter
protected final int
static final com.netflix.config.CachedDynamicIntProperty
static final com.netflix.config.CachedDynamicIntProperty
static final com.netflix.config.CachedDynamicIntProperty
protected final int
protected final MaxInboundConnectionsHandler
protected final int
protected final int
protected final String
protected static final io.netty.handler.logging.LoggingHandler
protected final PassportLoggingHandler
protected final PerEventLoopMetricsChannelHandler.Connections
protected final PerEventLoopMetricsChannelHandler.HttpRequests
protected final int
Deprecated.protected final io.netty.channel.ChannelHandler
protected final com.netflix.spectator.api.Registry
protected final RequestCompleteHandler
protected final SessionContextDecorator
protected final SourceAddressChannelHandler
protected final io.netty.channel.ChannelHandler
protected final StripUntrustedProxyHeadersHandler
protected final boolean
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
BaseZuulChannelInitializer
(int port, ChannelConfig channelConfig, ChannelConfig channelDependencies, io.netty.channel.group.ChannelGroup channels) Deprecated.protected
BaseZuulChannelInitializer
(String metricId, ChannelConfig channelConfig, ChannelConfig channelDependencies, io.netty.channel.group.ChannelGroup channels) After calling this method, child classes should not referenceport
any more. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addHttp1Handlers
(io.netty.channel.ChannelPipeline pipeline) protected void
addHttpRelatedHandlers
(io.netty.channel.ChannelPipeline pipeline) protected void
addPassportHandler
(io.netty.channel.ChannelPipeline pipeline) protected void
addSslClientCertChecks
(io.netty.channel.ChannelPipeline pipeline) protected void
addSslInfoHandlers
(io.netty.channel.ChannelPipeline pipeline, boolean isSSlFromIntermediary) protected void
addTcpRelatedHandlers
(io.netty.channel.ChannelPipeline pipeline) protected void
addTimeoutHandlers
(io.netty.channel.ChannelPipeline pipeline) protected void
addZuulFilterChainHandler
(io.netty.channel.ChannelPipeline pipeline) protected void
addZuulHandlers
(io.netty.channel.ChannelPipeline pipeline) protected io.netty.handler.codec.http.HttpServerCodec
protected ZuulEndPointRunner
getEndpointRunner
(ZuulFilterChainRunner<HttpResponseMessage> responseFilterChain, FilterUsageNotifier filterUsageNotifier, FilterLoader filterLoader) protected <T extends ZuulMessage>
ZuulFilterChainRunner<T>getFilterChainRunner
(ZuulFilter<T, T>[] filters, FilterUsageNotifier filterUsageNotifier) protected <T extends ZuulMessage,
R extends ZuulMessage>
ZuulFilterChainRunner<T>getFilterChainRunner
(ZuulFilter<T, T>[] filters, FilterUsageNotifier filterUsageNotifier, FilterRunner<T, R> filterRunner) <T extends ZuulMessage>
ZuulFilter<T,T>[] getFilters
(ZuulFilter<T, T> start, ZuulFilter<T, T> stop) protected void
storeChannel
(io.netty.channel.Channel ch) Methods inherited from class io.netty.channel.ChannelInitializer
channelRegistered, exceptionCaught, handlerAdded, handlerRemoved, initChannel
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelRead, channelReadComplete, channelUnregistered, channelWritabilityChanged, userEventTriggered
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, isSharable
-
Field Details
-
HTTP_CODEC_HANDLER_NAME
- See Also:
-
ATTR_CHANNEL_CONFIG
-
nettyLogger
protected static final io.netty.handler.logging.LoggingHandler nettyLogger -
MAX_INITIAL_LINE_LENGTH
public static final com.netflix.config.CachedDynamicIntProperty MAX_INITIAL_LINE_LENGTH -
MAX_HEADER_SIZE
public static final com.netflix.config.CachedDynamicIntProperty MAX_HEADER_SIZE -
MAX_CHUNK_SIZE
public static final com.netflix.config.CachedDynamicIntProperty MAX_CHUNK_SIZE -
port
Deprecated.The port that the server intends to listen on. Subclasses should NOT use this field, as it may not be set, and may differ from the actual listening port. For example:- When binding the server to port `0`, the actual port will be different from the one provided here.
- If there is no port (such as in a LocalSocket, or DomainSocket), the port number may be `-1`.
Instead, subclasses should read the local address on channel initialization, and decide to take action then.
-
metricId
-
channelConfig
-
channelDependencies
-
idleTimeout
protected final int idleTimeout -
httpRequestReadTimeout
protected final int httpRequestReadTimeout -
maxRequestsPerConnection
protected final int maxRequestsPerConnection -
maxRequestsPerConnectionInBrownout
protected final int maxRequestsPerConnectionInBrownout -
connectionExpiry
protected final int connectionExpiry -
maxConnections
protected final int maxConnections -
registry
protected final com.netflix.spectator.api.Registry registry -
httpMetricsHandler
-
perEventLoopConnectionMetricsHandler
-
perEventLoopRequestsMetricsHandler
-
maxConnectionsHandler
-
accessLogPublisher
-
passportLoggingHandler
-
withProxyProtocol
protected final boolean withProxyProtocol -
stripInboundProxyHeadersHandler
-
rateLimitingChannelHandler
protected final io.netty.channel.ChannelHandler rateLimitingChannelHandler -
sslClientCertCheckChannelHandler
protected final io.netty.channel.ChannelHandler sslClientCertCheckChannelHandler -
sessionContextDecorator
-
requestCompleteHandler
-
httpRequestReadTimeoutCounter
protected final com.netflix.spectator.api.Counter httpRequestReadTimeoutCounter -
filterLoader
-
filterUsageNotifier
-
sourceAddressChannelHandler
-
channels
protected final io.netty.channel.group.ChannelGroup channelsA collection of all the active channels that we can use to things like graceful shutdown
-
-
Constructor Details
-
BaseZuulChannelInitializer
protected BaseZuulChannelInitializer(String metricId, ChannelConfig channelConfig, ChannelConfig channelDependencies, io.netty.channel.group.ChannelGroup channels) After calling this method, child classes should not referenceport
any more. -
BaseZuulChannelInitializer
@Deprecated protected BaseZuulChannelInitializer(int port, ChannelConfig channelConfig, ChannelConfig channelDependencies, io.netty.channel.group.ChannelGroup channels) Deprecated.
-
-
Method Details
-
storeChannel
protected void storeChannel(io.netty.channel.Channel ch) -
addPassportHandler
protected void addPassportHandler(io.netty.channel.ChannelPipeline pipeline) -
addTcpRelatedHandlers
protected void addTcpRelatedHandlers(io.netty.channel.ChannelPipeline pipeline) -
addHttp1Handlers
protected void addHttp1Handlers(io.netty.channel.ChannelPipeline pipeline) -
createHttpServerCodec
protected io.netty.handler.codec.http.HttpServerCodec createHttpServerCodec() -
addHttpRelatedHandlers
protected void addHttpRelatedHandlers(io.netty.channel.ChannelPipeline pipeline) -
addTimeoutHandlers
protected void addTimeoutHandlers(io.netty.channel.ChannelPipeline pipeline) -
addSslInfoHandlers
protected void addSslInfoHandlers(io.netty.channel.ChannelPipeline pipeline, boolean isSSlFromIntermediary) -
addSslClientCertChecks
protected void addSslClientCertChecks(io.netty.channel.ChannelPipeline pipeline) -
addZuulHandlers
protected void addZuulHandlers(io.netty.channel.ChannelPipeline pipeline) -
addZuulFilterChainHandler
protected void addZuulFilterChainHandler(io.netty.channel.ChannelPipeline pipeline) -
getEndpointRunner
protected ZuulEndPointRunner getEndpointRunner(ZuulFilterChainRunner<HttpResponseMessage> responseFilterChain, FilterUsageNotifier filterUsageNotifier, FilterLoader filterLoader) -
getFilterChainRunner
protected <T extends ZuulMessage> ZuulFilterChainRunner<T> getFilterChainRunner(ZuulFilter<T, T>[] filters, FilterUsageNotifier filterUsageNotifier) -
getFilterChainRunner
protected <T extends ZuulMessage,R extends ZuulMessage> ZuulFilterChainRunner<T> getFilterChainRunner(ZuulFilter<T, T>[] filters, FilterUsageNotifier filterUsageNotifier, FilterRunner<T, R> filterRunner) -
getFilters
public <T extends ZuulMessage> ZuulFilter<T,T>[] getFilters(ZuulFilter<T, T> start, ZuulFilter<T, T> stop)
-