Showing preview only (1,890K chars total). Download the full file or copy to clipboard to get everything.
Repository: Netflix/zuul
Branch: master
Commit: 658eb26797df
Files: 414
Total size: 1.7 MB
Directory structure:
gitextract_tnrhk04n/
├── .github/
│ ├── CODEOWNERS
│ ├── dependabot.yml
│ └── workflows/
│ ├── benchmark.yml
│ ├── branch_snapshot.yml
│ ├── gradle-wrapper-validation.yml
│ ├── pr.yml
│ ├── release.yml
│ ├── snapshot.yml
│ └── stale.yml
├── .gitignore
├── .netflixoss
├── CHANGELOG.md
├── LICENSE
├── OSSMETADATA
├── README.md
├── build.gradle
├── codequality/
│ └── checkstyle.xml
├── gradle/
│ └── wrapper/
│ └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
├── zuul-core/
│ ├── build.gradle
│ └── src/
│ ├── jmh/
│ │ └── java/
│ │ └── com/
│ │ └── netflix/
│ │ └── zuul/
│ │ └── message/
│ │ └── HeadersBenchmark.java
│ ├── main/
│ │ └── java/
│ │ └── com/
│ │ └── netflix/
│ │ ├── config/
│ │ │ ├── DynamicIntegerSetProperty.java
│ │ │ └── PatternListStringProperty.java
│ │ ├── netty/
│ │ │ └── common/
│ │ │ ├── AbstrHttpConnectionExpiryHandler.java
│ │ │ ├── ByteBufUtil.java
│ │ │ ├── CategorizedThreadFactory.java
│ │ │ ├── CloseOnIdleStateHandler.java
│ │ │ ├── ConnectionCloseChannelAttributes.java
│ │ │ ├── ConnectionCloseType.java
│ │ │ ├── Http1ConnectionCloseHandler.java
│ │ │ ├── Http1ConnectionExpiryHandler.java
│ │ │ ├── Http2ConnectionCloseHandler.java
│ │ │ ├── Http2ConnectionExpiryHandler.java
│ │ │ ├── HttpChannelFlags.java
│ │ │ ├── HttpClientLifecycleChannelHandler.java
│ │ │ ├── HttpLifecycleChannelHandler.java
│ │ │ ├── HttpRequestReadTimeoutEvent.java
│ │ │ ├── HttpRequestReadTimeoutHandler.java
│ │ │ ├── HttpServerLifecycleChannelHandler.java
│ │ │ ├── RequestResponseCompleteEvent.java
│ │ │ ├── SourceAddressChannelHandler.java
│ │ │ ├── SslExceptionsHandler.java
│ │ │ ├── SwallowSomeHttp2ExceptionsHandler.java
│ │ │ ├── accesslog/
│ │ │ │ ├── AccessLogChannelHandler.java
│ │ │ │ └── AccessLogPublisher.java
│ │ │ ├── channel/
│ │ │ │ └── config/
│ │ │ │ ├── ChannelConfig.java
│ │ │ │ ├── ChannelConfigKey.java
│ │ │ │ ├── ChannelConfigValue.java
│ │ │ │ └── CommonChannelConfigKeys.java
│ │ │ ├── http2/
│ │ │ │ └── DynamicHttp2FrameLogger.java
│ │ │ ├── metrics/
│ │ │ │ ├── EventLoopGroupMetrics.java
│ │ │ │ ├── EventLoopMetrics.java
│ │ │ │ ├── Http2MetricsChannelHandlers.java
│ │ │ │ ├── HttpBodySizeRecordingChannelHandler.java
│ │ │ │ ├── HttpMetricsChannelHandler.java
│ │ │ │ ├── InstrumentedResourceLeakDetector.java
│ │ │ │ └── PerEventLoopMetricsChannelHandler.java
│ │ │ ├── proxyprotocol/
│ │ │ │ ├── ElbProxyProtocolChannelHandler.java
│ │ │ │ ├── HAProxyMessageChannelHandler.java
│ │ │ │ └── StripUntrustedProxyHeadersHandler.java
│ │ │ ├── ssl/
│ │ │ │ ├── ServerSslConfig.java
│ │ │ │ └── SslHandshakeInfo.java
│ │ │ ├── status/
│ │ │ │ └── ServerStatusManager.java
│ │ │ └── throttle/
│ │ │ ├── MaxInboundConnectionsHandler.java
│ │ │ ├── RejectionType.java
│ │ │ ├── RejectionUtils.java
│ │ │ └── RequestRejectedEvent.java
│ │ └── zuul/
│ │ ├── Attrs.java
│ │ ├── BasicFilterUsageNotifier.java
│ │ ├── BasicRequestCompleteHandler.java
│ │ ├── DefaultFilterFactory.java
│ │ ├── DynamicFilterLoader.java
│ │ ├── ExecutionStatus.java
│ │ ├── Filter.java
│ │ ├── FilterCategory.java
│ │ ├── FilterConstraint.java
│ │ ├── FilterFactory.java
│ │ ├── FilterFileManager.java
│ │ ├── FilterLoader.java
│ │ ├── FilterUsageNotifier.java
│ │ ├── RequestCompleteHandler.java
│ │ ├── StaticFilterLoader.java
│ │ ├── ZuulApplicationInfo.java
│ │ ├── constants/
│ │ │ ├── ZuulConstants.java
│ │ │ └── ZuulHeaders.java
│ │ ├── context/
│ │ │ ├── CommonContextKeys.java
│ │ │ ├── Debug.java
│ │ │ ├── SessionCleaner.java
│ │ │ ├── SessionContext.java
│ │ │ ├── SessionContextDecorator.java
│ │ │ ├── SessionContextFactory.java
│ │ │ └── ZuulSessionContextDecorator.java
│ │ ├── exception/
│ │ │ ├── ErrorType.java
│ │ │ ├── OutboundErrorType.java
│ │ │ ├── OutboundException.java
│ │ │ ├── RequestExpiredException.java
│ │ │ ├── ZuulException.java
│ │ │ └── ZuulFilterConcurrencyExceededException.java
│ │ ├── filters/
│ │ │ ├── BaseFilter.java
│ │ │ ├── BaseSyncFilter.java
│ │ │ ├── Endpoint.java
│ │ │ ├── FilterError.java
│ │ │ ├── FilterRegistry.java
│ │ │ ├── FilterSyncType.java
│ │ │ ├── FilterType.java
│ │ │ ├── MutableFilterRegistry.java
│ │ │ ├── ShouldFilter.java
│ │ │ ├── SyncZuulFilter.java
│ │ │ ├── SyncZuulFilterAdapter.java
│ │ │ ├── ZuulFilter.java
│ │ │ ├── common/
│ │ │ │ ├── GZipResponseFilter.java
│ │ │ │ └── SurgicalDebugFilter.java
│ │ │ ├── endpoint/
│ │ │ │ ├── EndpointLifecycle.java
│ │ │ │ ├── MissingEndpointHandlingFilter.java
│ │ │ │ └── ProxyEndpoint.java
│ │ │ ├── http/
│ │ │ │ ├── HttpInboundFilter.java
│ │ │ │ ├── HttpInboundSyncFilter.java
│ │ │ │ ├── HttpOutboundFilter.java
│ │ │ │ ├── HttpOutboundSyncFilter.java
│ │ │ │ └── HttpSyncEndpoint.java
│ │ │ └── passport/
│ │ │ ├── InboundPassportStampingFilter.java
│ │ │ ├── OutboundPassportStampingFilter.java
│ │ │ └── PassportStampingFilter.java
│ │ ├── logging/
│ │ │ └── Http2FrameLoggingPerClientIpHandler.java
│ │ ├── message/
│ │ │ ├── Header.java
│ │ │ ├── HeaderName.java
│ │ │ ├── Headers.java
│ │ │ ├── ZuulMessage.java
│ │ │ ├── ZuulMessageImpl.java
│ │ │ ├── http/
│ │ │ │ ├── Cookies.java
│ │ │ │ ├── HttpHeaderNames.java
│ │ │ │ ├── HttpHeaderNamesCache.java
│ │ │ │ ├── HttpQueryParams.java
│ │ │ │ ├── HttpRequestInfo.java
│ │ │ │ ├── HttpRequestMessage.java
│ │ │ │ ├── HttpRequestMessageImpl.java
│ │ │ │ ├── HttpResponseInfo.java
│ │ │ │ ├── HttpResponseMessage.java
│ │ │ │ └── HttpResponseMessageImpl.java
│ │ │ └── util/
│ │ │ └── HttpRequestBuilder.java
│ │ ├── metrics/
│ │ │ ├── OriginStats.java
│ │ │ └── OriginStatsFactory.java
│ │ ├── monitoring/
│ │ │ ├── ConnCounter.java
│ │ │ ├── ConnTimer.java
│ │ │ ├── MonitoringHelper.java
│ │ │ ├── Tracer.java
│ │ │ └── TracerFactory.java
│ │ ├── netty/
│ │ │ ├── ChannelUtils.java
│ │ │ ├── NettyRequestAttemptFactory.java
│ │ │ ├── RequestCancelledEvent.java
│ │ │ ├── SpectatorUtils.java
│ │ │ ├── connectionpool/
│ │ │ │ ├── BasicRequestStat.java
│ │ │ │ ├── ClientChannelManager.java
│ │ │ │ ├── ClientTimeoutHandler.java
│ │ │ │ ├── ConnectionPoolConfig.java
│ │ │ │ ├── ConnectionPoolConfigImpl.java
│ │ │ │ ├── ConnectionPoolHandler.java
│ │ │ │ ├── ConnectionPoolMetrics.java
│ │ │ │ ├── DefaultClientChannelManager.java
│ │ │ │ ├── DefaultOriginChannelInitializer.java
│ │ │ │ ├── IConnectionPool.java
│ │ │ │ ├── NettyClientConnectionFactory.java
│ │ │ │ ├── OriginChannelInitializer.java
│ │ │ │ ├── OriginConnectException.java
│ │ │ │ ├── PerServerConnectionPool.java
│ │ │ │ ├── PooledConnection.java
│ │ │ │ ├── PooledConnectionFactory.java
│ │ │ │ ├── RequestStat.java
│ │ │ │ └── ZuulNettyExceptionMapper.java
│ │ │ ├── filter/
│ │ │ │ ├── BaseZuulFilterRunner.java
│ │ │ │ ├── EventExecutorScheduler.java
│ │ │ │ ├── FilterConstraints.java
│ │ │ │ ├── FilterRunner.java
│ │ │ │ ├── ZuulEndPointRunner.java
│ │ │ │ ├── ZuulFilterChainHandler.java
│ │ │ │ └── ZuulFilterChainRunner.java
│ │ │ ├── insights/
│ │ │ │ ├── PassportLoggingHandler.java
│ │ │ │ ├── PassportStateHttpClientHandler.java
│ │ │ │ ├── PassportStateHttpServerHandler.java
│ │ │ │ ├── PassportStateListener.java
│ │ │ │ ├── PassportStateOriginHandler.java
│ │ │ │ └── ServerStateHandler.java
│ │ │ ├── ratelimiting/
│ │ │ │ └── NullChannelHandlerProvider.java
│ │ │ ├── server/
│ │ │ │ ├── BaseServerStartup.java
│ │ │ │ ├── BaseZuulChannelInitializer.java
│ │ │ │ ├── ClientConnectionsShutdown.java
│ │ │ │ ├── ClientRequestReceiver.java
│ │ │ │ ├── ClientResponseWriter.java
│ │ │ │ ├── DefaultEventLoopConfig.java
│ │ │ │ ├── DirectMemoryMonitor.java
│ │ │ │ ├── EventLoopConfig.java
│ │ │ │ ├── Http1MutualSslChannelInitializer.java
│ │ │ │ ├── ListenerSpec.java
│ │ │ │ ├── MethodBinding.java
│ │ │ │ ├── NamedSocketAddress.java
│ │ │ │ ├── OriginResponseReceiver.java
│ │ │ │ ├── Server.java
│ │ │ │ ├── ServerTimeout.java
│ │ │ │ ├── SocketAddressProperty.java
│ │ │ │ ├── ZuulDependencyKeys.java
│ │ │ │ ├── ZuulServerChannelInitializer.java
│ │ │ │ ├── http2/
│ │ │ │ │ ├── DummyChannelHandler.java
│ │ │ │ │ ├── Http2Configuration.java
│ │ │ │ │ ├── Http2ConnectionErrorHandler.java
│ │ │ │ │ ├── Http2ContentLengthEnforcingHandler.java
│ │ │ │ │ ├── Http2OrHttpHandler.java
│ │ │ │ │ ├── Http2ResetFrameHandler.java
│ │ │ │ │ ├── Http2SslChannelInitializer.java
│ │ │ │ │ ├── Http2StreamErrorHandler.java
│ │ │ │ │ ├── Http2StreamHeaderCleaner.java
│ │ │ │ │ └── Http2StreamInitializer.java
│ │ │ │ ├── psk/
│ │ │ │ │ ├── ClientPSKIdentityInfo.java
│ │ │ │ │ ├── ExternalTlsPskProvider.java
│ │ │ │ │ ├── PskCreationFailureException.java
│ │ │ │ │ ├── TlsPskDecoder.java
│ │ │ │ │ ├── TlsPskHandler.java
│ │ │ │ │ ├── TlsPskServerProtocol.java
│ │ │ │ │ ├── TlsPskUtils.java
│ │ │ │ │ └── ZuulPskServer.java
│ │ │ │ ├── push/
│ │ │ │ │ ├── PushAuthHandler.java
│ │ │ │ │ ├── PushChannelInitializer.java
│ │ │ │ │ ├── PushClientProtocolHandler.java
│ │ │ │ │ ├── PushConnection.java
│ │ │ │ │ ├── PushConnectionRegistry.java
│ │ │ │ │ ├── PushMessageFactory.java
│ │ │ │ │ ├── PushMessageSender.java
│ │ │ │ │ ├── PushMessageSenderInitializer.java
│ │ │ │ │ ├── PushProtocol.java
│ │ │ │ │ ├── PushRegistrationHandler.java
│ │ │ │ │ └── PushUserAuth.java
│ │ │ │ └── ssl/
│ │ │ │ └── SslHandshakeInfoHandler.java
│ │ │ ├── ssl/
│ │ │ │ ├── BaseSslContextFactory.java
│ │ │ │ ├── ClientSslContextFactory.java
│ │ │ │ └── SslContextFactory.java
│ │ │ └── timeouts/
│ │ │ ├── HttpHeadersTimeoutHandler.java
│ │ │ └── OriginTimeoutManager.java
│ │ ├── niws/
│ │ │ ├── RequestAttempt.java
│ │ │ └── RequestAttempts.java
│ │ ├── origins/
│ │ │ ├── BasicNettyOrigin.java
│ │ │ ├── BasicNettyOriginManager.java
│ │ │ ├── InstrumentedOrigin.java
│ │ │ ├── NettyOrigin.java
│ │ │ ├── Origin.java
│ │ │ ├── OriginConcurrencyExceededException.java
│ │ │ ├── OriginManager.java
│ │ │ ├── OriginName.java
│ │ │ └── OriginThrottledException.java
│ │ ├── passport/
│ │ │ ├── CurrentPassport.java
│ │ │ ├── PassportItem.java
│ │ │ ├── PassportState.java
│ │ │ └── StartAndEnd.java
│ │ ├── plugins/
│ │ │ └── Tracer.java
│ │ ├── stats/
│ │ │ ├── AmazonInfoHolder.java
│ │ │ ├── BasicRequestMetricsPublisher.java
│ │ │ ├── ErrorStatsData.java
│ │ │ ├── ErrorStatsManager.java
│ │ │ ├── NamedCountingMonitor.java
│ │ │ ├── RequestMetricsPublisher.java
│ │ │ ├── RouteStatusCodeMonitor.java
│ │ │ ├── StatsManager.java
│ │ │ ├── monitoring/
│ │ │ │ ├── Monitor.java
│ │ │ │ ├── MonitorRegistry.java
│ │ │ │ └── NamedCount.java
│ │ │ └── status/
│ │ │ ├── StatusCategory.java
│ │ │ ├── StatusCategoryGroup.java
│ │ │ ├── StatusCategoryUtils.java
│ │ │ ├── ZuulStatusCategory.java
│ │ │ └── ZuulStatusCategoryGroup.java
│ │ └── util/
│ │ ├── Gzipper.java
│ │ ├── HttpUtils.java
│ │ ├── JsonUtility.java
│ │ ├── ProxyUtils.java
│ │ └── VipUtils.java
│ └── test/
│ └── java/
│ └── com/
│ └── netflix/
│ ├── netty/
│ │ └── common/
│ │ ├── CloseOnIdleStateHandlerTest.java
│ │ ├── HttpServerLifecycleChannelHandlerTest.java
│ │ ├── SourceAddressChannelHandlerTest.java
│ │ ├── metrics/
│ │ │ └── InstrumentedResourceLeakDetectorTest.java
│ │ ├── proxyprotocol/
│ │ │ ├── ElbProxyProtocolChannelHandlerTest.java
│ │ │ ├── HAProxyMessageChannelHandlerTest.java
│ │ │ └── StripUntrustedProxyHeadersHandlerTest.java
│ │ ├── ssl/
│ │ │ └── ServerSslConfigTest.java
│ │ └── throttle/
│ │ └── MaxInboundConnectionsHandlerTest.java
│ └── zuul/
│ ├── AttrsTest.java
│ ├── DynamicFilterLoaderTest.java
│ ├── StaticFilterLoaderTest.java
│ ├── com/
│ │ └── netflix/
│ │ └── zuul/
│ │ └── netty/
│ │ └── server/
│ │ └── push/
│ │ └── PushConnectionTest.java
│ ├── context/
│ │ ├── DebugTest.java
│ │ └── SessionContextTest.java
│ ├── filters/
│ │ ├── BaseFilterTest.java
│ │ ├── common/
│ │ │ └── GZipResponseFilterTest.java
│ │ └── endpoint/
│ │ └── ProxyEndpointTest.java
│ ├── message/
│ │ ├── HeadersTest.java
│ │ ├── ZuulMessageImplTest.java
│ │ └── http/
│ │ ├── CookiesTest.java
│ │ ├── HttpQueryParamsTest.java
│ │ ├── HttpRequestMessageImplTest.java
│ │ └── HttpResponseMessageImplTest.java
│ ├── monitoring/
│ │ ├── ConnCounterTest.java
│ │ └── ConnTimerTest.java
│ ├── netty/
│ │ ├── NettyRequestAttemptFactoryTest.java
│ │ ├── connectionpool/
│ │ │ ├── ClientTimeoutHandlerTest.java
│ │ │ ├── ConnectionPoolConfigImplTest.java
│ │ │ ├── ConnectionPoolMetricsTest.java
│ │ │ ├── DefaultClientChannelManagerTest.java
│ │ │ ├── PerServerConnectionPoolTest.java
│ │ │ └── PooledConnectionTest.java
│ │ ├── filter/
│ │ │ ├── BaseZuulFilterRunnerTest.java
│ │ │ ├── EventExecutorSchedulerTest.java
│ │ │ ├── FilterConstraintsTest.java
│ │ │ ├── ZuulEndPointRunnerTest.java
│ │ │ └── ZuulFilterChainRunnerTest.java
│ │ ├── insights/
│ │ │ └── ServerStateHandlerTest.java
│ │ ├── server/
│ │ │ ├── BaseZuulChannelInitializerTest.java
│ │ │ ├── ClientConnectionsShutdownTest.java
│ │ │ ├── ClientRequestReceiverTest.java
│ │ │ ├── ClientResponseWriterTest.java
│ │ │ ├── IoUringTest.java
│ │ │ ├── OriginResponseReceiverTest.java
│ │ │ ├── ServerTest.java
│ │ │ ├── SocketAddressPropertyTest.java
│ │ │ ├── http2/
│ │ │ │ ├── Http2ConnectionErrorHandlerTest.java
│ │ │ │ ├── Http2ContentLengthEnforcingHandlerTest.java
│ │ │ │ └── Http2OrHttpHandlerTest.java
│ │ │ ├── push/
│ │ │ │ ├── PushAuthHandlerTest.java
│ │ │ │ ├── PushConnectionRegistryTest.java
│ │ │ │ ├── PushMessageSenderInitializerTest.java
│ │ │ │ └── PushRegistrationHandlerTest.java
│ │ │ └── ssl/
│ │ │ └── SslHandshakeInfoHandlerTest.java
│ │ ├── ssl/
│ │ │ ├── BaseSslContextFactoryTest.java
│ │ │ ├── ClientSslContextFactoryTest.java
│ │ │ └── OpenSslTest.java
│ │ └── timeouts/
│ │ ├── HttpHeadersTimeoutHandlerTest.java
│ │ └── OriginTimeoutManagerTest.java
│ ├── niws/
│ │ └── RequestAttemptTest.java
│ ├── origins/
│ │ └── OriginNameTest.java
│ ├── passport/
│ │ └── CurrentPassportTest.java
│ ├── stats/
│ │ ├── ErrorStatsDataTest.java
│ │ ├── ErrorStatsManagerTest.java
│ │ ├── RouteStatusCodeMonitorTest.java
│ │ ├── StatsManagerTest.java
│ │ └── status/
│ │ └── ZuulStatusCategoryTest.java
│ └── util/
│ ├── HttpUtilsTest.java
│ ├── JsonUtilityTest.java
│ └── VipUtilsTest.java
├── zuul-discovery/
│ ├── build.gradle
│ └── src/
│ ├── main/
│ │ └── java/
│ │ └── com/
│ │ └── netflix/
│ │ └── zuul/
│ │ ├── discovery/
│ │ │ ├── DiscoveryResult.java
│ │ │ ├── DynamicServerResolver.java
│ │ │ ├── NonDiscoveryServer.java
│ │ │ ├── ResolverResult.java
│ │ │ └── SimpleMetaInfo.java
│ │ └── resolver/
│ │ ├── Resolver.java
│ │ └── ResolverListener.java
│ └── test/
│ └── java/
│ └── com/
│ └── netflix/
│ └── zuul/
│ └── discovery/
│ ├── DiscoveryResultTest.java
│ └── DynamicServerResolverTest.java
├── zuul-integration-test/
│ ├── build.gradle
│ └── src/
│ └── test/
│ ├── java/
│ │ └── com/
│ │ └── netflix/
│ │ ├── netty/
│ │ │ └── common/
│ │ │ └── metrics/
│ │ │ └── CustomLeakDetector.java
│ │ └── zuul/
│ │ └── integration/
│ │ ├── BaseIntegrationTest.java
│ │ ├── MultiEventLoopIntegrationTest.java
│ │ ├── SingleEventLoopIntegrationTest.java
│ │ ├── ZuulServerExtension.java
│ │ └── server/
│ │ ├── Bootstrap.java
│ │ ├── HeaderNames.java
│ │ ├── OriginServerList.java
│ │ ├── ServerStartup.java
│ │ ├── TestUtil.java
│ │ └── filters/
│ │ ├── BodyUtil.java
│ │ ├── CrossThreadBoundaryFilter.java
│ │ ├── InboundRoutesFilter.java
│ │ ├── NeedsBodyBufferedInboundFilter.java
│ │ ├── NeedsBodyBufferedOutboundFilter.java
│ │ ├── RequestHeaderFilter.java
│ │ └── ResponseHeaderFilter.java
│ └── resources/
│ └── log4j2-test.xml
├── zuul-processor/
│ ├── build.gradle
│ └── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── netflix/
│ │ │ └── zuul/
│ │ │ └── filters/
│ │ │ └── processor/
│ │ │ └── FilterProcessor.java
│ │ └── resources/
│ │ └── META-INF/
│ │ ├── gradle/
│ │ │ └── incremental.annotation.processors
│ │ └── services/
│ │ └── javax.annotation.processing.Processor
│ └── test/
│ └── java/
│ └── com/
│ └── netflix/
│ └── zuul/
│ └── filters/
│ └── processor/
│ ├── FilterProcessorTest.java
│ ├── TestFilter.java
│ ├── TopLevelFilter.java
│ ├── override/
│ │ ├── SubpackageFilter.java
│ │ └── package-info.java
│ └── subpackage/
│ └── OverrideFilter.java
└── zuul-sample/
├── build.gradle
└── src/
└── main/
├── java/
│ └── com/
│ └── netflix/
│ └── zuul/
│ └── sample/
│ ├── Bootstrap.java
│ ├── SampleServerStartup.java
│ ├── SampleService.java
│ ├── filters/
│ │ ├── Debug.java
│ │ ├── endpoint/
│ │ │ └── Healthcheck.java
│ │ ├── inbound/
│ │ │ ├── DebugRequest.java
│ │ │ ├── Routes.java
│ │ │ └── SampleServiceFilter.java
│ │ └── outbound/
│ │ └── ZuulResponseFilter.java
│ └── push/
│ ├── SamplePushAuthHandler.java
│ ├── SamplePushMessageSender.java
│ ├── SamplePushMessageSenderInitializer.java
│ ├── SamplePushUserAuth.java
│ ├── SampleSSEPushChannelInitializer.java
│ ├── SampleSSEPushClientProtocolHandler.java
│ ├── SampleWebSocketPushChannelInitializer.java
│ └── SampleWebSocketPushClientProtocolHandler.java
└── resources/
├── application-benchmark.properties
├── application-test.properties
├── application.properties
├── log4j2.xml
└── ssl/
├── client.cert
├── client.key
├── server.cert
├── server.key
├── truststore.jks
└── truststore.key
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/CODEOWNERS
================================================
# Default reviewers for Zuul OSS
* @argha-c @jguerra @gavinbunney @lalernehl @lindseyreynolds @AlexanderEllis @fool1280 @tappenzeller @ilanachalom
# Note: exclusions aren't well supported atm.
# If needed, use workflows to exclude specific files from review.
================================================
FILE: .github/dependabot.yml
================================================
version: 2
updates:
- package-ecosystem: "gradle"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
================================================
FILE: .github/workflows/benchmark.yml
================================================
name: benchmark
on:
workflow_dispatch:
permissions:
contents: read
env:
JDK: '21'
DISTRIBUTION: 'zulu'
GRADLE_COMMAND: './gradlew --no-daemon'
jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up JDK ${{ env.JDK }}
uses: actions/setup-java@v5
with:
java-version: ${{ env.JDK }}
distribution: ${{ env.DISTRIBUTION }}
- name: JMH
run: ${{ env.GRADLE_COMMAND }} clean :zuul-core:jmh
================================================
FILE: .github/workflows/branch_snapshot.yml
================================================
name: Branch Snapshot
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to publish snapshot of'
required: true
default: 'master'
repository:
description: 'Repository name (override for forks)'
required: false
default: Netflix/zuul
version:
description: 'The version number to use'
required: true
jobs:
build:
runs-on: ubuntu-latest
environment: Publish
steps:
- name: Setup Git
run: |
git config --global user.name 'Zuul Build'
git config --global user.email 'zuul-build@netflix.com'
- uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.event.inputs.branch }}
repository: ${{ github.event.inputs.repository }}
- name: Set up JDK
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 21
cache: 'gradle'
- name: Build snapshot
run: ./gradlew build snapshot -Prelease.version="$BUILD_VERSION"
env:
BUILD_VERSION: ${{ github.event.inputs.version }}
NETFLIX_OSS_SIGNING_KEY: ${{ secrets.ORG_SIGNING_KEY }}
NETFLIX_OSS_SIGNING_PASSWORD: ${{ secrets.ORG_SIGNING_PASSWORD }}
NETFLIX_OSS_REPO_USERNAME: ${{ secrets.ORG_NETFLIXOSS_USERNAME }}
NETFLIX_OSS_REPO_PASSWORD: ${{ secrets.ORG_NETFLIXOSS_PASSWORD }}
================================================
FILE: .github/workflows/gradle-wrapper-validation.yml
================================================
name: "Validate Gradle Wrapper"
on: [push, pull_request]
jobs:
validation:
name: "Gradle wrapper validation"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: gradle/actions/wrapper-validation@v5
================================================
FILE: .github/workflows/pr.yml
================================================
name: PR Build
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [21]
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: ${{ matrix.java }}
cache: 'gradle'
- name: Build
run: |
sudo env "PATH=$PATH" bash -c "ulimit -l 65536 && ulimit -a && ./gradlew --no-daemon build"
echo "Status of build: $?"
validation:
name: "Gradle Validation"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: gradle/actions/wrapper-validation@v5
================================================
FILE: .github/workflows/release.yml
================================================
name: Release
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
- v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+
jobs:
build:
runs-on: ubuntu-latest
environment: Publish
steps:
- name: Setup Git
run: |
git config --global user.name 'Zuul Build'
git config --global user.email 'zuul-build@netflix.com'
- uses: actions/checkout@v6
- uses: gradle/actions/wrapper-validation@v5
- name: Set up JDK
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 21
cache: 'gradle'
- name: Build candidate
if: contains(github.ref, '-rc.')
run: ./gradlew --info --stacktrace -Prelease.useLastTag=true candidate
env:
NETFLIX_OSS_SIGNING_KEY: ${{ secrets.ORG_SIGNING_KEY }}
NETFLIX_OSS_SIGNING_PASSWORD: ${{ secrets.ORG_SIGNING_PASSWORD }}
NETFLIX_OSS_REPO_USERNAME: ${{ secrets.ORG_NETFLIXOSS_USERNAME }}
NETFLIX_OSS_REPO_PASSWORD: ${{ secrets.ORG_NETFLIXOSS_PASSWORD }}
- name: Build release
if: (!contains(github.ref, '-rc.'))
run: ./gradlew --info -Prelease.useLastTag=true final
env:
NETFLIX_OSS_SONATYPE_USERNAME: ${{ secrets.ORG_SONATYPE_USERNAME }}
NETFLIX_OSS_SONATYPE_PASSWORD: ${{ secrets.ORG_SONATYPE_PASSWORD }}
NETFLIX_OSS_SIGNING_KEY: ${{ secrets.ORG_SIGNING_KEY }}
NETFLIX_OSS_SIGNING_PASSWORD: ${{ secrets.ORG_SIGNING_PASSWORD }}
NETFLIX_OSS_REPO_USERNAME: ${{ secrets.ORG_NETFLIXOSS_USERNAME }}
NETFLIX_OSS_REPO_PASSWORD: ${{ secrets.ORG_NETFLIXOSS_PASSWORD }}
================================================
FILE: .github/workflows/snapshot.yml
================================================
name: Snapshot
on:
push:
branches:
- master
- zuul-v4
jobs:
build:
runs-on: ubuntu-latest
environment: Publish
steps:
- name: Setup Git
run: |
git config --global user.name 'Zuul Build'
git config --global user.email 'zuul-build@netflix.com'
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 21
cache: 'gradle'
- name: Build snapshot
run: ./gradlew build snapshot
env:
NETFLIX_OSS_SIGNING_KEY: ${{ secrets.ORG_SIGNING_KEY }}
NETFLIX_OSS_SIGNING_PASSWORD: ${{ secrets.ORG_SIGNING_PASSWORD }}
NETFLIX_OSS_REPO_USERNAME: ${{ secrets.ORG_NETFLIXOSS_USERNAME }}
NETFLIX_OSS_REPO_PASSWORD: ${{ secrets.ORG_NETFLIXOSS_PASSWORD }}
================================================
FILE: .github/workflows/stale.yml
================================================
name: 'Close stale issues and PRs'
on:
schedule:
- cron: "*/10 5 * * *"
jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v10
with:
stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
stale-pr-message: 'This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
close-issue-message: 'This issue was closed because it has been stalled for 7 days with no activity.'
close-pr-message: 'This PR was closed because it has been stalled for 7 days with no activity.'
================================================
FILE: .gitignore
================================================
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
# Logs and databases #
######################
*.log
# OS generated files #
######################
.DS_Store*
ehthumbs.db
Icon?
Thumbs.db
# Editor Files #
################
*~
*.swp
# Gradle Files #
################
.gradle
# Build output directies
/target
*/target
/build
*/build
.m2
/classes
# IntelliJ specific files/directories
out
.idea
*.ipr
*.iws
*.iml
atlassian-ide-plugin.xml
# Visual Studio Code
.vscode
# Java heap profile
*.hprof
# Eclipse specific files/directories
.classpath
.project
.settings
.metadata
zuul-sample/src/main/generated/
# NetBeans specific files/directories
.nbattrs
# publishing secrets
secrets/signing-key
================================================
FILE: .netflixoss
================================================
jdk=8
================================================
FILE: CHANGELOG.md
================================================
================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2012-2015 Netflix, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: OSSMETADATA
================================================
osslifecycle=active
================================================
FILE: README.md
================================================
[](https://github.com/Netflix/zuul/actions/workflows/snapshot.yml)
# Zuul
<img src="https://i.imgur.com/mRSosEp.png" width=500/>
Zuul is an L7 application gateway that provides capabilities for dynamic routing, monitoring, resiliency, security, and more.
Please view the wiki for usage, information, HOWTO, etc https://github.com/Netflix/zuul/wiki
Here are some links to help you learn more about the Zuul Project. Feel free to PR to add any other info, presentations, etc.
---
Articles from Netflix:
Zuul 1: http://techblog.netflix.com/2013/06/announcing-zuul-edge-service-in-cloud.html
Zuul 2:
https://netflixtechblog.com/open-sourcing-zuul-2-82ea476cb2b3
https://netflixtechblog.com/zuul-2-the-netflix-journey-to-asynchronous-non-blocking-systems-45947377fb5c
https://netflixtechblog.com/the-show-must-go-on-securing-netflix-studios-at-scale-19b801c86479
---
Netflix presentations about Zuul:
Strange Loop 2017 - Zuul 2: https://youtu.be/2oXqbLhMS_A
AWS re:Invent 2018 - Scaling push messaging for millions of Netflix devices: https://youtu.be/IdR6N9B-S1E
---
Slides from Netflix presentations about Zuul:
http://www.slideshare.net/MikeyCohen1/zuul-netflix-springone-platform
http://www.slideshare.net/MikeyCohen1/rethinking-cloud-proxies-54923218
https://github.com/strangeloop/StrangeLoop2017/blob/master/slides/ArthurGonigberg-ZuulsJourneyToNonBlocking.pdf
https://www.slideshare.net/SusheelAroskar/scaling-push-messaging-for-millions-of-netflix-devices
---
Projects Using Zuul:
https://cloud.spring.io/
https://jhipster.github.io/
---
Info and examples from various projects:
https://cloud.spring.io/spring-cloud-netflix/multi/multi__router_and_filter_zuul
http://www.baeldung.com/spring-rest-with-zuul-proxy
https://blog.heroku.com/using_netflix_zuul_to_proxy_your_microservices
http://blog.ippon.tech/jhipster-3-0-introducing-microservices/
---
Other blog posts about Zuul:
https://engineering.riotgames.com/news/riot-games-api-fulfilling-zuuls-destiny
https://engineering.riotgames.com/news/riot-games-api-deep-dive
http://instea.sk/2015/04/netflix-zuul-vs-nginx-performance/
---
# How to release Zuul
This project uses a GitHub Action workflow for publishing a new release.
The workflow is triggered by a Git tag.
```
git checkout master
git tag vX.Y.Z
git push --tags
```
================================================
FILE: build.gradle
================================================
buildscript {
dependencies {
classpath 'com.palantir.javaformat:gradle-palantir-java-format:2.83.0'
}
}
plugins {
id 'com.netflix.nebula.netflixoss' version '13.0.0'
id "com.google.osdetector" version '1.7.3'
id 'me.champeau.jmh' version '0.7.2'
id 'org.openrewrite.rewrite' version '7.12.1'
id 'net.ltgt.errorprone' version '4.1.0'
id 'com.diffplug.spotless' version "8.1.0"
id 'idea'
}
ext.githubProjectName = rootProject.name
idea {
project {
languageLevel = '21'
}
}
configurations.all {
exclude group: 'asm', module: 'asm'
exclude group: 'asm', module: 'asm-all'
}
allprojects {
repositories {
mavenCentral()
}
apply plugin: 'com.diffplug.spotless'
spotless {
enforceCheck false
java {
rootProject.hasProperty('spotlessJavaTarget') ? target(rootProject.getProperty('spotlessJavaTarget').split(",")) : target('src/*/java/**/*.java')
removeUnusedImports('cleanthat-javaparser-unnecessaryimport')
palantirJavaFormat()
}
}
}
subprojects {
apply plugin: 'com.netflix.nebula.netflixoss'
apply plugin: 'java'
apply plugin: 'com.netflix.nebula.javadoc-jar'
apply plugin: 'com.netflix.nebula.dependency-lock'
apply plugin: 'me.champeau.jmh'
apply plugin: 'org.openrewrite.rewrite'
apply plugin: 'net.ltgt.errorprone'
license {
ignoreFailures = false
excludes([
"**/META-INF/services/javax.annotation.processing.Processor",
"**/META-INF/gradle/incremental.annotation.processors",
"**/*.cert",
"**/*.jks",
"**/*.key",
])
}
group = "com.netflix.${githubProjectName}"
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
tasks.withType(JavaCompile).configureEach {
dependencies {
errorprone "com.uber.nullaway:nullaway:0.12.4"
errorprone "com.google.errorprone:error_prone_core:2.45.0"
}
options.compilerArgs << "-Werror"
options.errorprone {
check("NullAway", net.ltgt.gradle.errorprone.CheckSeverity.OFF)
option("NullAway:AnnotatedPackages", "com.netflix.zuul")
errorproneArgs.addAll(
// Uncomment and remove -Werror javac flag to automatically apply fixes for a check.
// N.B: disables all other checks while enabled.
// "-XepPatchChecks:UnnecessaryParentheses",
// "-XepPatchLocation:IN_PLACE",
"-Xep:ClassCanBeStatic:OFF",
"-Xep:EmptyBlockTag:OFF",
"-Xep:FutureReturnValueIgnored:OFF",
"-Xep:InlineMeSuggester:OFF",
"-Xep:MissingSummary:OFF",
)
}
}
eclipse {
classpath {
downloadSources = true
downloadJavadoc = true
}
}
tasks.withType(Javadoc).each {
it.classpath = sourceSets.main.compileClasspath
// Ignore Javadoc warnings for now, re-enable after Zuul 3.
it.options.addStringOption('Xdoclint:none', '-quiet')
}
ext {
libraries = [
guava: "com.google.guava:guava:33.3.0-jre",
okhttp: 'com.squareup.okhttp3:okhttp:4.12.0',
jupiterApi: 'org.junit.jupiter:junit-jupiter-api:5.13.+',
jupiterParams: 'org.junit.jupiter:junit-jupiter-params:5.13.+',
jupiterEngine: 'org.junit.jupiter:junit-jupiter-engine:5.13.+',
junitPlatformLauncher: 'org.junit.platform:junit-platform-launcher:1.13.+',
jupiterMockito: 'org.mockito:mockito-junit-jupiter:5.13.+',
mockito: 'org.mockito:mockito-core:5.+',
slf4j: "org.slf4j:slf4j-api:2.0.16",
assertj: 'org.assertj:assertj-core:3.26.3',
awaitility: 'org.awaitility:awaitility:4.2.2',
lombok: 'org.projectlombok:lombok:1.18.42'
]
}
test {
useJUnitPlatform()
testLogging {
showStandardStreams = true
}
maxParallelForks = Runtime.runtime.availableProcessors();
}
}
dependencies {
rewrite(platform("org.openrewrite.recipe:rewrite-recipe-bom:3.12.1"))
rewrite("org.openrewrite.recipe:rewrite-logging-frameworks")
rewrite("org.openrewrite.recipe:rewrite-testing-frameworks")
rewrite("org.openrewrite.recipe:rewrite-static-analysis")
}
rewrite {
failOnDryRunResults = true
activeRecipe("org.openrewrite.java.testing.junit5.JUnit5BestPractices")
activeRecipe("org.openrewrite.java.logging.slf4j.Slf4jBestPractices")
}
================================================
FILE: codequality/checkstyle.xml
================================================
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="Checker">
<!-- Checks that a package-info.java file exists for each package. -->
<!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage -->
<!--
<module name="JavadocPackage">
<property name="allowLegacy" value="true"/>
</module>
-->
<!-- Checks whether files end with a new line. -->
<!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
<module name="NewlineAtEndOfFile"/>
<!-- Checks that property files contain the same keys. -->
<!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
<module name="Translation"/>
<!-- Checks for Size Violations. -->
<!-- See http://checkstyle.sf.net/config_sizes.html -->
<module name="FileLength"/>
<!-- Checks for whitespace -->
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
<module name="FileTabCharacter"/>
<!-- Miscellaneous other checks. -->
<!-- See http://checkstyle.sf.net/config_misc.html -->
<module name="RegexpSingleline">
<property name="format" value="\s+$"/>
<property name="minimum" value="0"/>
<property name="maximum" value="0"/>
<property name="message" value="Line has trailing spaces."/>
<property name="severity" value="info"/>
</module>
<module name="TreeWalker">
<!-- Checks for Javadoc comments. -->
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
<module name="JavadocMethod">
<property name="scope" value="package"/>
<property name="allowMissingParamTags" value="true"/>
<property name="allowMissingThrowsTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/>
<property name="allowThrowsTagsForSubclasses" value="true"/>
<property name="allowUndeclaredRTE" value="true"/>
<property name="allowMissingPropertyJavadoc" value="true"/>
</module>
<module name="JavadocType">
<property name="scope" value="package"/>
</module>
<module name="JavadocVariable">
<property name="scope" value="package"/>
</module>
<module name="JavadocStyle">
<property name="checkEmptyJavadoc" value="true"/>
</module>
<!-- Checks for Naming Conventions. -->
<!-- See http://checkstyle.sf.net/config_naming.html -->
<module name="ConstantName"/>
<module name="LocalFinalVariableName"/>
<module name="LocalVariableName"/>
<module name="MemberName"/>
<module name="MethodName"/>
<module name="PackageName"/>
<module name="ParameterName"/>
<module name="StaticVariableName"/>
<module name="TypeName"/>
<!-- Checks for imports -->
<!-- See http://checkstyle.sf.net/config_import.html -->
<module name="AvoidStarImport"/>
<module name="IllegalImport"/> <!-- defaults to sun.* packages -->
<module name="RedundantImport"/>
<module name="UnusedImports"/>
<!-- Checks for Size Violations. -->
<!-- See http://checkstyle.sf.net/config_sizes.html -->
<module name="LineLength">
<!-- what is a good max value? -->
<property name="max" value="120"/>
<!-- ignore lines like "$File: //depot/... $" -->
<property name="ignorePattern" value="\$File.*\$"/>
<property name="severity" value="info"/>
</module>
<module name="MethodLength"/>
<module name="ParameterNumber"/>
<!-- Checks for whitespace -->
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
<module name="EmptyForIteratorPad"/>
<module name="GenericWhitespace"/>
<module name="MethodParamPad"/>
<module name="NoWhitespaceAfter"/>
<module name="NoWhitespaceBefore"/>
<module name="OperatorWrap"/>
<module name="ParenPad"/>
<module name="TypecastParenPad"/>
<module name="WhitespaceAfter"/>
<module name="WhitespaceAround"/>
<!-- Modifier Checks -->
<!-- See http://checkstyle.sf.net/config_modifiers.html -->
<module name="ModifierOrder"/>
<module name="RedundantModifier"/>
<!-- Checks for blocks. You know, those {}'s -->
<!-- See http://checkstyle.sf.net/config_blocks.html -->
<module name="AvoidNestedBlocks"/>
<module name="EmptyBlock">
<property name="option" value="text"/>
</module>
<module name="LeftCurly"/>
<module name="NeedBraces"/>
<module name="RightCurly"/>
<!-- Checks for common coding problems -->
<!-- See http://checkstyle.sf.net/config_coding.html -->
<!-- <module name="AvoidInlineConditionals"/> -->
<module name="DoubleCheckedLocking"/> <!-- MY FAVOURITE -->
<module name="EmptyStatement"/>
<module name="EqualsHashCode"/>
<module name="HiddenField">
<property name="ignoreConstructorParameter" value="true"/>
<property name="ignoreSetter" value="true"/>
<property name="severity" value="warning"/>
</module>
<module name="IllegalInstantiation"/>
<module name="InnerAssignment"/>
<module name="MagicNumber">
<property name="severity" value="warning"/>
</module>
<module name="MissingSwitchDefault"/>
<!-- Problem with finding exception types... -->
<module name="RedundantThrows">
<property name="allowUnchecked" value="true"/>
<property name="suppressLoadErrors" value="true"/>
<property name="severity" value="info"/>
</module>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<!-- Checks for class design -->
<!-- See http://checkstyle.sf.net/config_design.html -->
<!-- <module name="DesignForExtension"/> -->
<module name="FinalClass"/>
<module name="HideUtilityClassConstructor"/>
<module name="InterfaceIsType"/>
<module name="VisibilityModifier"/>
<!-- Miscellaneous other checks. -->
<!-- See http://checkstyle.sf.net/config_misc.html -->
<module name="ArrayTypeStyle"/>
<!-- <module name="FinalParameters"/> -->
<module name="TodoComment">
<property name="format" value="TODO"/>
<property name="severity" value="info"/>
</module>
<module name="UpperEll"/>
<module name="FileContentsHolder"/> <!-- Required by comment suppression filters -->
</module>
<!-- Enable suppression comments -->
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE IGNORE\s+(\S+)"/>
<property name="onCommentFormat" value="CHECKSTYLE END IGNORE\s+(\S+)"/>
<property name="checkFormat" value="$1"/>
</module>
<module name="SuppressWithNearbyCommentFilter">
<!-- Syntax is "SUPPRESS CHECKSTYLE name" -->
<property name="commentFormat" value="SUPPRESS CHECKSTYLE (\w+)"/>
<property name="checkFormat" value="$1"/>
<property name="influenceFormat" value="1"/>
</module>
</module>
================================================
FILE: gradle/wrapper/gradle-wrapper.properties
================================================
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
================================================
FILE: gradle.properties
================================================
versions_ribbon=2.4.4
versions_netty=4.2.10.Final
versions_brotli4j=1.16.0
release.scope=patch
release.version=3.3.0-SNAPSHOT
org.gradle.jvmargs=-Xms1g -Xmx2g
com.netflix.testcontainers-cloud.enabled=false
palantir.native.formatter=true
================================================
FILE: gradlew
================================================
#!/bin/sh
#
# Copyright © 2015 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
warn () {
echo "$*"
} >&2
die () {
echo
echo "$*"
echo
exit 1
} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
esac
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD=$JAVA_HOME/jre/sh/java
else
JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD=java
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"
================================================
FILE: gradlew.bat
================================================
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:execute
@rem Setup the command line
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
================================================
FILE: settings.gradle
================================================
rootProject.name='zuul'
include 'zuul-core'
include 'zuul-processor'
include 'zuul-sample'
include 'zuul-discovery'
include 'zuul-integration-test'
================================================
FILE: zuul-core/build.gradle
================================================
apply plugin: "com.google.osdetector"
apply plugin: "java-library"
dependencies {
compileOnly libraries.lombok
testCompileOnly(libraries.lombok)
annotationProcessor(libraries.lombok)
implementation libraries.guava
// TODO(carl-mastrangelo): this can be implementation; remove Logger from public api points.
api libraries.slf4j
implementation 'org.bouncycastle:bcprov-jdk18on:1.78.1'
implementation 'org.bouncycastle:bcpkix-jdk18on:1.78.1'
implementation 'org.bouncycastle:bctls-jdk18on:1.78.1'
implementation 'com.fasterxml.jackson.core:jackson-core:2.19.2'
api 'com.fasterxml.jackson.core:jackson-databind:2.19.2'
api "com.netflix.archaius:archaius-core:0.7.12"
api "com.netflix.spectator:spectator-api:latest.release"
api "com.netflix.netflix-commons:netflix-commons-util:0.3.0"
api project(":zuul-discovery")
api "com.netflix.ribbon:ribbon-core:${versions_ribbon}"
api "com.netflix.ribbon:ribbon-archaius:${versions_ribbon}"
api "com.netflix.eureka:eureka-client:2.0.4"
api "io.reactivex:rxjava:1.3.8"
api platform("io.netty:netty-bom:${versions_netty}")
// TODO(carl-mastrangelo): some of these could probably be implementation. Do a deeper check.
api "io.netty:netty-common"
api "io.netty:netty-buffer"
api "io.netty:netty-codec-http"
api "io.netty:netty-codec-http2"
api "io.netty:netty-handler"
api "io.netty:netty-transport"
implementation "io.netty:netty-codec-haproxy"
implementation (group: "io.netty", "name": "netty-transport-native-epoll", "classifier": "linux-x86_64")
implementation (group: "io.netty", "name": "netty-transport-native-io_uring", "classifier": "linux-x86_64")
implementation (group: "io.netty", "name": "netty-transport-native-kqueue", "classifier": "osx-x86_64")
// We are using the long-form dependency syntax here because we want to
// explicitly set the classifier. We do not have the version number so we can't use
// Gradle's short-form dependency notation.
runtimeOnly( group: "io.netty", name: "netty-tcnative-boringssl-static", classifier: "linux-x86_64" )
runtimeOnly( group: "io.netty", name: "netty-tcnative-boringssl-static", classifier: "linux-aarch_64" )
runtimeOnly( group: "io.netty", name: "netty-tcnative-boringssl-static", classifier: "osx-x86_64" )
runtimeOnly( group: "io.netty", name: "netty-tcnative-boringssl-static", classifier: "osx-aarch_64" )
implementation 'io.perfmark:perfmark-api:0.27.0'
api 'jakarta.inject:jakarta.inject-api:2.0.1'
api 'org.jspecify:jspecify:1.0.0'
testImplementation libraries.jupiterApi, libraries.jupiterParams, libraries.jupiterEngine, libraries.junitPlatformLauncher, libraries.jupiterMockito,
libraries.mockito,
libraries.assertj,
libraries.awaitility
testImplementation 'commons-configuration:commons-configuration:1.10'
testRuntimeOnly 'org.slf4j:slf4j-simple:2.0.17'
jmh 'org.openjdk.jmh:jmh-core:1.+'
jmh 'org.openjdk.jmh:jmh-generator-annprocess:1.+'
jmh 'org.openjdk.jmh:jmh-generator-bytecode:1.+'
}
// Silences log statements during tests. This still allows normal failures to be printed.
test {
testLogging {
showStandardStreams = false
}
}
// ./gradlew --no-daemon clean :zuul-core:jmh
jmh {
profilers = ["gc"]
timeOnIteration = "1s"
warmup = "1s"
fork = 1
warmupIterations = 10
iterations = 5
// Not sure why duplicate classes are on the path. Something Nebula related I think.
duplicateClassesStrategy = DuplicatesStrategy.EXCLUDE
}
================================================
FILE: zuul-core/src/jmh/java/com/netflix/zuul/message/HeadersBenchmark.java
================================================
/*
* Copyright 2020 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.zuul.message;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.TimeUnit;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.infra.Blackhole;
@State(Scope.Thread)
public class HeadersBenchmark {
@State(Scope.Thread)
public static class AddHeaders {
@Param({"0", "1", "5", "10", "30"})
public int count;
@Param({"10"})
public int nameLength;
private String[] stringNames;
private HeaderName[] names;
private String[] values;
@Setup
public void setUp() {
stringNames = new String[count];
names = new HeaderName[stringNames.length];
values = new String[stringNames.length];
for (int i = 0; i < stringNames.length; i++) {
UUID uuid = new UUID(
ThreadLocalRandom.current().nextLong(),
ThreadLocalRandom.current().nextLong());
String name = uuid.toString();
assert name.length() >= nameLength;
name = name.substring(0, nameLength);
names[i] = new HeaderName(name);
stringNames[i] = name;
values[i] = name;
}
}
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
public Headers addHeaders_string() {
Headers headers = new Headers();
for (int i = 0; i < count; i++) {
headers.add(stringNames[i], values[i]);
}
return headers;
}
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
public Headers addHeaders_headerName() {
Headers headers = new Headers();
for (int i = 0; i < count; i++) {
headers.add(names[i], values[i]);
}
return headers;
}
}
@State(Scope.Thread)
public static class GetSetHeaders {
@Param({"1", "5", "10", "30"})
public int count;
@Param({"10"})
public int nameLength;
private String[] stringNames;
private HeaderName[] names;
private String[] values;
Headers headers;
@Setup
public void setUp() {
headers = new Headers();
stringNames = new String[count];
names = new HeaderName[stringNames.length];
values = new String[stringNames.length];
for (int i = 0; i < stringNames.length; i++) {
UUID uuid = new UUID(
ThreadLocalRandom.current().nextLong(),
ThreadLocalRandom.current().nextLong());
String name = uuid.toString();
assert name.length() >= nameLength;
name = name.substring(0, nameLength);
names[i] = new HeaderName(name);
stringNames[i] = name;
values[i] = name;
headers.add(names[i], values[i]);
}
}
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
public void setHeader_first() {
headers.set(names[0], "blah");
}
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
public void setHeader_last() {
headers.set(names[count - 1], "blah");
}
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
public List<String> getHeader_first() {
return headers.getAll(names[0]);
}
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
public List<String> getHeader_last() {
return headers.getAll(names[count - 1]);
}
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
public void entries(Blackhole blackhole) {
for (Header header : headers.entries()) {
blackhole.consume(header);
}
}
}
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
public Headers newHeaders() {
return new Headers();
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/config/DynamicIntegerSetProperty.java
================================================
/*
* Copyright 2018 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.config;
import java.util.Set;
public class DynamicIntegerSetProperty extends DynamicSetProperty<Integer> {
public DynamicIntegerSetProperty(String propName, String defaultValue) {
super(propName, defaultValue);
}
public DynamicIntegerSetProperty(String propName, String defaultValue, String delimiterRegex) {
super(propName, defaultValue, delimiterRegex);
}
public DynamicIntegerSetProperty(String propName, Set<Integer> defaultValue) {
super(propName, defaultValue);
}
public DynamicIntegerSetProperty(String propName, Set<Integer> defaultValue, String delimiterRegex) {
super(propName, defaultValue, delimiterRegex);
}
@Override
protected Integer from(String value) {
return Integer.valueOf(value);
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/config/PatternListStringProperty.java
================================================
/*
* Copyright 2018 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.config;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Pattern;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* User: michaels@netflix.com
* Date: 5/15/17
* Time: 4:38 PM
*/
public class PatternListStringProperty extends DerivedStringProperty<List<Pattern>> {
private static final Logger LOG = LoggerFactory.getLogger(PatternListStringProperty.class);
public PatternListStringProperty(String name, String defaultValue) {
super(name, defaultValue);
}
@Override
protected List<Pattern> derive(String value) {
ArrayList<Pattern> ptns = new ArrayList<>();
if (value != null) {
for (String ptnTxt : value.split(",", -1)) {
try {
ptns.add(Pattern.compile(ptnTxt.trim()));
} catch (Exception e) {
LOG.error(
"Error parsing regex pattern list from property! name = {}, value = {}, pattern = {}",
String.valueOf(this.getName()),
String.valueOf(this.getValue()),
String.valueOf(value));
}
}
}
return ptns;
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/AbstrHttpConnectionExpiryHandler.java
================================================
/*
* Copyright 2018 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common;
import com.netflix.config.CachedDynamicLongProperty;
import com.netflix.zuul.netty.ChannelUtils;
import com.netflix.zuul.util.HttpUtils;
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelOutboundHandlerAdapter;
import io.netty.channel.ChannelPromise;
import java.util.concurrent.ThreadLocalRandom;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* User: michaels@netflix.com
* Date: 7/17/17
* Time: 10:54 AM
*/
public abstract class AbstrHttpConnectionExpiryHandler extends ChannelOutboundHandlerAdapter {
protected static final Logger LOG = LoggerFactory.getLogger(AbstrHttpConnectionExpiryHandler.class);
protected static final CachedDynamicLongProperty MAX_EXPIRY_DELTA =
new CachedDynamicLongProperty("server.connection.expiry.delta", 20 * 1000);
protected final ConnectionCloseType connectionCloseType;
protected final int maxRequests;
protected final int maxExpiry;
protected final long connectionStartTime;
protected final long connectionExpiryTime;
protected int requestCount = 0;
protected int maxRequestsUnderBrownout = 0;
public AbstrHttpConnectionExpiryHandler(
ConnectionCloseType connectionCloseType, int maxRequestsUnderBrownout, int maxRequests, int maxExpiry) {
this.connectionCloseType = connectionCloseType;
this.maxRequestsUnderBrownout = maxRequestsUnderBrownout;
this.maxRequests = maxRequests;
this.maxExpiry = maxExpiry;
this.connectionStartTime = System.currentTimeMillis();
long randomDelta = ThreadLocalRandom.current().nextLong(MAX_EXPIRY_DELTA.get());
this.connectionExpiryTime = connectionStartTime + maxExpiry + randomDelta;
}
@Override
public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception {
if (isResponseHeaders(msg)) {
// Update the request count attribute for this channel.
requestCount++;
if (isConnectionExpired(ctx.channel())) {
// Flag this channel to be closed after response is written.
Channel channel = HttpUtils.getMainChannel(ctx);
ctx.channel()
.attr(ConnectionCloseChannelAttributes.CLOSE_AFTER_RESPONSE)
.set(ctx.newPromise());
ConnectionCloseType.setForChannel(channel, connectionCloseType);
}
}
super.write(ctx, msg, promise);
}
protected boolean isConnectionExpired(Channel channel) {
boolean expired = requestCount >= maxRequests(channel) || System.currentTimeMillis() > connectionExpiryTime;
if (expired) {
long lifetime = System.currentTimeMillis() - connectionStartTime;
LOG.info(
"Connection is expired. requestCount={}, lifetime={}, {}",
requestCount,
lifetime,
ChannelUtils.channelInfoForLogging(channel));
}
return expired;
}
protected abstract boolean isResponseHeaders(Object msg);
protected int maxRequests(Channel ch) {
if (HttpChannelFlags.IN_BROWNOUT.get(ch)) {
return this.maxRequestsUnderBrownout;
} else {
return this.maxRequests;
}
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/ByteBufUtil.java
================================================
/*
* Copyright 2022 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common;
import com.netflix.zuul.message.ZuulMessage;
import io.netty.handler.codec.http.HttpResponse;
import io.netty.util.ReferenceCounted;
import io.netty.util.ResourceLeakDetector;
/**
* ByteBufUtil
*
* @author Arthur Gonigberg
* @since October 20, 2022
*/
public class ByteBufUtil {
@SuppressWarnings("EnumOrdinal")
private static final boolean isAdvancedLeakDetection =
ResourceLeakDetector.getLevel().ordinal() >= ResourceLeakDetector.Level.ADVANCED.ordinal();
public static void touch(ReferenceCounted byteBuf, String hint, ZuulMessage msg) {
if (isAdvancedLeakDetection) {
byteBuf.touch(hint + msg);
}
}
public static void touch(ReferenceCounted byteBuf, String hint) {
if (isAdvancedLeakDetection) {
byteBuf.touch(hint);
}
}
public static void touch(ReferenceCounted byteBuf, String hint, String filterName) {
if (isAdvancedLeakDetection) {
byteBuf.touch(hint + filterName);
}
}
public static void touch(HttpResponse originResponse, String hint, ZuulMessage msg) {
if (isAdvancedLeakDetection && originResponse instanceof ReferenceCounted) {
((ReferenceCounted) originResponse).touch(hint + msg);
}
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/CategorizedThreadFactory.java
================================================
/*
* Copyright 2018 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common;
import io.netty.util.concurrent.FastThreadLocalThread;
import java.util.concurrent.ThreadFactory;
/**
* User: Mike Smith
* Date: 6/8/16
* Time: 11:49 AM
*/
public class CategorizedThreadFactory implements ThreadFactory {
private final String category;
private int num = 0;
public CategorizedThreadFactory(String category) {
super();
this.category = category;
}
@Override
public Thread newThread(Runnable r) {
FastThreadLocalThread t = new FastThreadLocalThread(r, category + "-" + num++);
return t;
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/CloseOnIdleStateHandler.java
================================================
/**
* Copyright 2018 Netflix, Inc.
* <p>
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package com.netflix.netty.common;
import com.netflix.spectator.api.Counter;
import com.netflix.spectator.api.Registry;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.handler.timeout.IdleStateEvent;
/**
* Just listens for the IdleStateEvent and closes the channel if received.
*/
public class CloseOnIdleStateHandler extends ChannelInboundHandlerAdapter {
private final Counter counter;
public CloseOnIdleStateHandler(Registry registry, String metricId) {
this.counter = registry.counter("server.connections.idle.timeout", "id", metricId);
}
@Override
public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
super.userEventTriggered(ctx, evt);
if (evt instanceof IdleStateEvent) {
counter.increment();
ctx.close();
}
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/ConnectionCloseChannelAttributes.java
================================================
/*
* Copyright 2019 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common;
import com.netflix.netty.common.channel.config.ChannelConfig;
import com.netflix.netty.common.channel.config.CommonChannelConfigKeys;
import com.netflix.zuul.netty.server.BaseZuulChannelInitializer;
import io.netty.channel.Channel;
import io.netty.channel.ChannelPromise;
import io.netty.util.AttributeKey;
public class ConnectionCloseChannelAttributes {
public static final AttributeKey<ChannelPromise> CLOSE_AFTER_RESPONSE =
AttributeKey.newInstance("CLOSE_AFTER_RESPONSE");
public static final AttributeKey<ConnectionCloseType> CLOSE_TYPE = AttributeKey.newInstance("CLOSE_TYPE");
public static int gracefulCloseDelay(Channel channel) {
ChannelConfig channelConfig =
channel.attr(BaseZuulChannelInitializer.ATTR_CHANNEL_CONFIG).get();
Integer gracefulCloseDelay = channelConfig.get(CommonChannelConfigKeys.connCloseDelay);
return gracefulCloseDelay == null ? 0 : gracefulCloseDelay;
}
public static boolean allowGracefulDelayed(Channel channel) {
ChannelConfig channelConfig =
channel.attr(BaseZuulChannelInitializer.ATTR_CHANNEL_CONFIG).get();
Boolean value = channelConfig.get(CommonChannelConfigKeys.http2AllowGracefulDelayed);
return value == null ? false : value;
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/ConnectionCloseType.java
================================================
/*
* Copyright 2018 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common;
import io.netty.channel.Channel;
/**
* User: michaels@netflix.com
* Date: 2/8/17
* Time: 2:04 PM
*/
public enum ConnectionCloseType {
IMMEDIATE,
GRACEFUL,
DELAYED_GRACEFUL;
public static ConnectionCloseType fromChannel(Channel ch) {
ConnectionCloseType type =
ch.attr(ConnectionCloseChannelAttributes.CLOSE_TYPE).get();
if (type == null) {
// Default to immediate.
type = ConnectionCloseType.IMMEDIATE;
}
return type;
}
public static void setForChannel(Channel ch, ConnectionCloseType type) {
ch.attr(ConnectionCloseChannelAttributes.CLOSE_TYPE).set(type);
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/Http1ConnectionCloseHandler.java
================================================
/*
* Copyright 2018 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common;
import io.netty.channel.Channel;
import io.netty.channel.ChannelDuplexHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelPromise;
import io.netty.handler.codec.http.HttpHeaderNames;
import io.netty.handler.codec.http.HttpResponse;
import io.netty.handler.codec.http.LastHttpContent;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* User: michaels@netflix.com
* Date: 2/8/17
* Time: 2:03 PM
*/
public class Http1ConnectionCloseHandler extends ChannelDuplexHandler {
private static final Logger LOG = LoggerFactory.getLogger(Http1ConnectionCloseHandler.class);
private final AtomicBoolean requestInflight = new AtomicBoolean(Boolean.FALSE);
@Override
public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception {
ChannelPromise closePromise = ctx.channel()
.attr(ConnectionCloseChannelAttributes.CLOSE_AFTER_RESPONSE)
.get();
if (msg instanceof HttpResponse response && closePromise != null) {
// Add header to tell client that they should close this connection.
response.headers().set(HttpHeaderNames.CONNECTION, "close");
}
super.write(ctx, msg, promise);
// Close the connection immediately after LastContent is written, rather than
// waiting until the graceful-delay is up if this flag is set.
if (msg instanceof LastHttpContent) {
if (closePromise != null) {
promise.addListener(future -> {
ConnectionCloseType type = ConnectionCloseType.fromChannel(ctx.channel());
closeChannel(ctx, type, closePromise);
});
}
}
}
@Override
public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
// Track when there's an inflight request.
if (evt instanceof HttpLifecycleChannelHandler.StartEvent) {
requestInflight.set(Boolean.TRUE);
} else if (evt instanceof HttpLifecycleChannelHandler.CompleteEvent) {
requestInflight.set(Boolean.FALSE);
}
super.userEventTriggered(ctx, evt);
}
protected void closeChannel(ChannelHandlerContext ctx, ConnectionCloseType evt, ChannelPromise promise) {
switch (evt) {
case DELAYED_GRACEFUL:
gracefully(ctx, promise);
break;
case GRACEFUL:
gracefully(ctx, promise);
break;
case IMMEDIATE:
immediately(ctx, promise);
break;
default:
throw new IllegalArgumentException("Unknown ConnectionCloseEvent type! - " + String.valueOf(evt));
}
}
protected void gracefully(ChannelHandlerContext ctx, ChannelPromise promise) {
Channel channel = ctx.channel();
if (channel.isActive()) {
String channelId = channel.id().asShortText();
// In gracefulCloseDelay secs time, go ahead and close the connection if it hasn't already been.
int gracefulCloseDelay = ConnectionCloseChannelAttributes.gracefulCloseDelay(channel);
ctx.executor()
.schedule(
() -> {
// Check that the client hasn't already closed the connection.
if (channel.isActive()) {
// If there is still an inflight request, then don't close the conn now. Instead
// assume that it will be closed
// either after the response finally gets written (due to us having set the
// CLOSE_AFTER_RESPONSE flag), or when the IdleTimeout
// for this conn fires.
if (requestInflight.get()) {
LOG.debug(
"gracefully: firing graceful_shutdown event to close connection, but"
+ " request still inflight, so leaving. channel={}",
channelId);
} else {
LOG.debug(
"gracefully: firing graceful_shutdown event to close connection."
+ " channel={}",
channelId);
ctx.close(promise);
}
} else {
LOG.debug("gracefully: connection already closed. channel={}", channelId);
promise.setSuccess();
}
},
gracefulCloseDelay,
TimeUnit.SECONDS);
} else {
promise.setSuccess();
}
}
protected void immediately(ChannelHandlerContext ctx, ChannelPromise promise) {
if (ctx.channel().isActive()) {
ctx.close(promise);
} else {
promise.setSuccess();
}
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/Http1ConnectionExpiryHandler.java
================================================
/*
* Copyright 2018 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common;
import io.netty.handler.codec.http.HttpResponse;
/**
* User: michaels@netflix.com
* Date: 2/8/17
* Time: 9:58 AM
*/
public class Http1ConnectionExpiryHandler extends AbstrHttpConnectionExpiryHandler {
public Http1ConnectionExpiryHandler(int maxRequests, int maxRequestsUnderBrownout, int maxExpiry) {
super(ConnectionCloseType.GRACEFUL, maxRequestsUnderBrownout, maxRequests, maxExpiry);
}
@Override
protected boolean isResponseHeaders(Object msg) {
return msg instanceof HttpResponse;
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/Http2ConnectionCloseHandler.java
================================================
/*
* Copyright 2018 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common;
import com.netflix.spectator.api.Id;
import com.netflix.spectator.api.Registry;
import com.netflix.zuul.util.HttpUtils;
import io.netty.channel.Channel;
import io.netty.channel.ChannelDuplexHandler;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelPromise;
import io.netty.channel.DelegatingChannelPromiseNotifier;
import io.netty.handler.codec.http2.DefaultHttp2GoAwayFrame;
import io.netty.handler.codec.http2.Http2DataFrame;
import io.netty.handler.codec.http2.Http2Error;
import io.netty.handler.codec.http2.Http2Exception;
import io.netty.handler.codec.http2.Http2HeadersFrame;
import io.netty.util.concurrent.EventExecutor;
import jakarta.inject.Inject;
import java.util.concurrent.TimeUnit;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* User: michaels@netflix.com
* Date: 2/8/17
* Time: 2:03 PM
*/
@ChannelHandler.Sharable
public class Http2ConnectionCloseHandler extends ChannelDuplexHandler {
private static final Logger LOG = LoggerFactory.getLogger(Http2ConnectionCloseHandler.class);
private final Registry registry;
private final Id counterBaseId;
@Inject
public Http2ConnectionCloseHandler(Registry registry) {
super();
this.registry = registry;
this.counterBaseId = registry.createId("server.connection.close.handled");
}
private void incrementCounter(ConnectionCloseType closeType, int port) {
registry.counter(counterBaseId
.withTag("close_type", closeType.name())
.withTag("port", Integer.toString(port))
.withTag("protocol", "http2"))
.increment();
}
@Override
public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception {
// Close the connection immediately after LastContent is written, rather than
// waiting until the graceful-delay is up if this flag is set.
if (isEndOfRequestResponse(msg)) {
Channel parent = HttpUtils.getMainChannel(ctx);
ChannelPromise closeAfterPromise = shouldCloseAfter(ctx, parent);
if (closeAfterPromise != null) {
// Add listener to close the channel AFTER response has been sent.
promise.addListener(future -> {
// Close the parent (tcp connection) channel.
closeChannel(ctx, closeAfterPromise);
});
}
}
super.write(ctx, msg, promise);
}
/**
* Look on both the stream channel, and the parent channel to see if the CLOSE_AFTER_RESPONSE flag has been set.
* If so, return that promise.
*
* @param ctx
* @param parent
* @return
*/
private ChannelPromise shouldCloseAfter(ChannelHandlerContext ctx, Channel parent) {
ChannelPromise closeAfterPromise = ctx.channel()
.attr(ConnectionCloseChannelAttributes.CLOSE_AFTER_RESPONSE)
.get();
if (closeAfterPromise == null) {
closeAfterPromise = parent.attr(ConnectionCloseChannelAttributes.CLOSE_AFTER_RESPONSE)
.get();
}
return closeAfterPromise;
}
private boolean isEndOfRequestResponse(Object msg) {
if (msg instanceof Http2HeadersFrame) {
return ((Http2HeadersFrame) msg).isEndStream();
}
if (msg instanceof Http2DataFrame) {
return ((Http2DataFrame) msg).isEndStream();
}
return false;
}
private void closeChannel(ChannelHandlerContext ctx, ChannelPromise promise) {
Channel child = ctx.channel();
Channel parent = HttpUtils.getMainChannel(ctx);
// 1. Check if already_closing flag on this stream channel. If there is, then success this promise and return.
// If not, then add already_closing flag to this stream channel.
// 2. Check if already_closing flag on the parent channel.
// If so, then just return.
// If not, then set already_closing on parent channel, and then allow through.
if (isAlreadyClosing(child)) {
promise.setSuccess();
return;
}
if (isAlreadyClosing(parent)) {
return;
}
// Close according to the specified close type.
ConnectionCloseType closeType = ConnectionCloseType.fromChannel(parent);
Integer port =
parent.attr(SourceAddressChannelHandler.ATTR_SERVER_LOCAL_PORT).get();
port = port == null ? -1 : port;
incrementCounter(closeType, port);
switch (closeType) {
case DELAYED_GRACEFUL:
gracefullyWithDelay(ctx.executor(), parent, promise);
break;
case GRACEFUL:
case IMMEDIATE:
immediate(parent, promise);
break;
default:
throw new IllegalArgumentException("Unknown ConnectionCloseEvent type! - " + closeType);
}
}
/**
* WARNING: Found the OkHttp client gets confused by this behaviour (it ends up putting itself in a bad shutdown state
* after receiving the first goaway frame, and then dropping any inflight responses but also timing out waiting for them).
*
* And worried that other http/2 stacks may be similar, so for now we should NOT use this.
*
* This is unfortunate, as FTL wanted this, and it is correct according to the spec.
*
* See this code in okhttp where it drops response header frame if state is already shutdown:
* https://github.com/square/okhttp/blob/master/okhttp/src/main/java/okhttp3/internal/http2/Http2Connection.java#L609
*/
private void gracefullyWithDelay(EventExecutor executor, Channel parent, ChannelPromise promise) {
// See javadoc for explanation of why this may be disabled.
boolean allowGracefulDelayed = ConnectionCloseChannelAttributes.allowGracefulDelayed(parent);
if (!allowGracefulDelayed) {
immediate(parent, promise);
return;
}
if (!parent.isActive()) {
promise.setSuccess();
return;
}
// First send a 'graceful shutdown' GOAWAY frame.
/*
"A server that is attempting to gracefully shut down a connection SHOULD send an initial GOAWAY frame with
the last stream identifier set to 231-1 and a NO_ERROR code. This signals to the client that a shutdown is
imminent and that initiating further requests is prohibited."
-- https://http2.github.io/http2-spec/#GOAWAY
*/
DefaultHttp2GoAwayFrame goaway = new DefaultHttp2GoAwayFrame(Http2Error.NO_ERROR);
goaway.setExtraStreamIds(Integer.MAX_VALUE);
parent.writeAndFlush(goaway);
LOG.debug(
"gracefullyWithDelay: flushed initial go_away frame. channel={}",
parent.id().asShortText());
// In N secs time, throw an error that causes the http2 codec to send another GOAWAY frame
// (this time with accurate lastStreamId) and then close the connection.
int gracefulCloseDelay = ConnectionCloseChannelAttributes.gracefulCloseDelay(parent);
executor.schedule(
() -> {
// Check that the client hasn't already closed the connection (due to the earlier goaway we sent).
if (parent.isActive()) {
// NOTE - the netty Http2ConnectionHandler specifically does not send another goaway when we
// call
// channel.close() if one has already been sent .... so when we want more than one sent, we need
// to do it
// explicitly ourselves like this.
LOG.debug(
"gracefullyWithDelay: firing graceful_shutdown event to make netty send a final"
+ " go_away frame and then close connection. channel={}",
parent.id().asShortText());
Http2Exception h2e =
new Http2Exception(Http2Error.NO_ERROR, Http2Exception.ShutdownHint.GRACEFUL_SHUTDOWN);
parent.pipeline().fireExceptionCaught(h2e);
parent.close().addListener(future -> {
promise.setSuccess();
});
} else {
promise.setSuccess();
}
},
gracefulCloseDelay,
TimeUnit.SECONDS);
}
private void immediate(Channel parent, ChannelPromise promise) {
if (parent.isActive()) {
parent.close().addListener(new DelegatingChannelPromiseNotifier(promise));
} else {
promise.setSuccess();
}
}
protected boolean isAlreadyClosing(Channel parentChannel) {
// If already closing, then just return.
// This will happen because close() is called a 2nd time after sending the goaway frame.
if (HttpChannelFlags.CLOSING.get(parentChannel)) {
return true;
} else {
HttpChannelFlags.CLOSING.set(parentChannel);
return false;
}
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/Http2ConnectionExpiryHandler.java
================================================
/*
* Copyright 2018 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common;
import io.netty.channel.ChannelHandler;
import io.netty.handler.codec.http2.Http2HeadersFrame;
/**
* This needs to be inserted in the pipeline after the Http2 Codex, but before any h2->h1 conversion.
*
* User: michaels@netflix.com
* Date: 2/8/17
* Time: 9:58 AM
*/
@ChannelHandler.Sharable
public class Http2ConnectionExpiryHandler extends AbstrHttpConnectionExpiryHandler {
public Http2ConnectionExpiryHandler(int maxRequests, int maxRequestsUnderBrownout, int maxExpiry) {
super(ConnectionCloseType.DELAYED_GRACEFUL, maxRequestsUnderBrownout, maxRequests, maxExpiry);
}
@Override
protected boolean isResponseHeaders(Object msg) {
return msg instanceof Http2HeadersFrame;
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/HttpChannelFlags.java
================================================
/*
* Copyright 2018 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common;
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;
import io.netty.util.Attribute;
import io.netty.util.AttributeKey;
/**
* User: michaels@netflix.com
* Date: 7/10/17
* Time: 4:29 PM
*/
public class HttpChannelFlags {
public static final Flag IN_BROWNOUT = new Flag("_brownout");
public static final Flag CLOSING = new Flag("_connection_closing");
public static class Flag {
private final AttributeKey<Boolean> attributeKey;
public Flag(String name) {
attributeKey = AttributeKey.newInstance(name);
}
public void set(Channel ch) {
ch.attr(attributeKey).set(Boolean.TRUE);
}
public void set(ChannelHandlerContext ctx) {
set(ctx.channel());
}
public void remove(Channel ch) {
ch.attr(attributeKey).set(null);
}
public boolean get(Channel ch) {
Attribute<Boolean> attr = ch.attr(attributeKey);
Boolean value = attr.get();
return (value == null) ? false : value;
}
public boolean get(ChannelHandlerContext ctx) {
return get(ctx.channel());
}
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/HttpClientLifecycleChannelHandler.java
================================================
/*
* Copyright 2018 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.channel.ChannelOutboundHandlerAdapter;
import io.netty.channel.ChannelPromise;
import io.netty.handler.codec.http.HttpRequest;
import io.netty.handler.codec.http.HttpResponse;
import io.netty.handler.codec.http.LastHttpContent;
/**
* @author michaels
*/
public class HttpClientLifecycleChannelHandler extends HttpLifecycleChannelHandler {
public static final ChannelHandler INBOUND_CHANNEL_HANDLER = new HttpClientLifecycleInboundChannelHandler();
public static final ChannelHandler OUTBOUND_CHANNEL_HANDLER = new HttpClientLifecycleOutboundChannelHandler();
@ChannelHandler.Sharable
private static class HttpClientLifecycleInboundChannelHandler extends ChannelInboundHandlerAdapter {
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
if (msg instanceof HttpResponse) {
ctx.channel().attr(ATTR_HTTP_RESP).set((HttpResponse) msg);
}
try {
super.channelRead(ctx, msg);
} finally {
if (msg instanceof LastHttpContent) {
fireCompleteEventIfNotAlready(ctx, CompleteReason.SESSION_COMPLETE);
}
}
}
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
try {
super.channelInactive(ctx);
} finally {
fireCompleteEventIfNotAlready(ctx, CompleteReason.INACTIVE);
}
}
}
@ChannelHandler.Sharable
private static class HttpClientLifecycleOutboundChannelHandler extends ChannelOutboundHandlerAdapter {
@Override
public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception {
if (msg instanceof HttpRequest) {
fireStartEvent(ctx, (HttpRequest) msg);
}
super.write(ctx, msg, promise);
}
@Override
public void disconnect(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception {
fireCompleteEventIfNotAlready(ctx, CompleteReason.DISCONNECT);
super.disconnect(ctx, promise);
}
@Override
public void deregister(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception {
fireCompleteEventIfNotAlready(ctx, CompleteReason.DEREGISTER);
super.deregister(ctx, promise);
}
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
super.exceptionCaught(ctx, cause);
fireCompleteEventIfNotAlready(ctx, CompleteReason.EXCEPTION);
}
@Override
public void close(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception {
fireCompleteEventIfNotAlready(ctx, CompleteReason.CLOSE);
super.close(ctx, promise);
}
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/HttpLifecycleChannelHandler.java
================================================
/*
* Copyright 2018 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common;
import com.google.common.annotations.VisibleForTesting;
import com.netflix.zuul.passport.CurrentPassport;
import com.netflix.zuul.passport.PassportState;
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.http.HttpRequest;
import io.netty.handler.codec.http.HttpResponse;
import io.netty.util.Attribute;
import io.netty.util.AttributeKey;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* User: michaels@netflix.com
* Date: 5/24/16
* Time: 4:09 PM
*/
public abstract class HttpLifecycleChannelHandler {
private static final Logger logger = LoggerFactory.getLogger(HttpLifecycleChannelHandler.class);
public static final AttributeKey<HttpRequest> ATTR_HTTP_REQ = AttributeKey.newInstance("_http_request");
public static final AttributeKey<HttpResponse> ATTR_HTTP_RESP = AttributeKey.newInstance("_http_response");
public static final AttributeKey<Boolean> ATTR_HTTP_PIPELINE_REJECT =
AttributeKey.newInstance("_http_pipeline_reject");
protected enum State {
STARTED,
COMPLETED
}
@VisibleForTesting
protected static final AttributeKey<State> ATTR_STATE = AttributeKey.newInstance("_httplifecycle_state");
protected static boolean fireStartEvent(ChannelHandlerContext ctx, HttpRequest request) {
// Only allow this method to run once per request.
Channel channel = ctx.channel();
Attribute<State> attr = channel.attr(ATTR_STATE);
State state = attr.get();
if (state == State.STARTED) {
// This could potentially happen if a bad client sends a 2nd request on the same connection
// without waiting for the response from the first. And we don't support HTTP Pipelining.
logger.debug(
"Received a http request on connection where we already have a request being processed. Closing"
+ " the connection now. channel = {}",
channel.id().asLongText());
channel.attr(ATTR_HTTP_PIPELINE_REJECT).set(Boolean.TRUE);
channel.close();
return false;
}
channel.attr(ATTR_STATE).set(State.STARTED);
channel.attr(ATTR_HTTP_REQ).set(request);
ctx.pipeline().fireUserEventTriggered(new StartEvent(request));
return true;
}
protected static boolean fireCompleteEventIfNotAlready(ChannelHandlerContext ctx, CompleteReason reason) {
// Only allow this method to run once per request.
Attribute<State> attr = ctx.channel().attr(ATTR_STATE);
State state = attr.get();
if (state == null || state != State.STARTED) {
return false;
}
attr.set(State.COMPLETED);
HttpRequest request = ctx.channel().attr(ATTR_HTTP_REQ).get();
HttpResponse response = ctx.channel().attr(ATTR_HTTP_RESP).get();
// Cleanup channel attributes.
ctx.channel().attr(ATTR_HTTP_REQ).set(null);
ctx.channel().attr(ATTR_HTTP_RESP).set(null);
// Fire the event to whole pipeline.
ctx.pipeline().fireUserEventTriggered(new CompleteEvent(reason, request, response));
return true;
}
protected static void addPassportState(ChannelHandlerContext ctx, PassportState state) {
CurrentPassport passport = CurrentPassport.fromChannel(ctx.channel());
passport.add(state);
}
public enum CompleteReason {
SESSION_COMPLETE,
INACTIVE,
// IDLE,
DISCONNECT,
DEREGISTER,
PIPELINE_REJECT,
EXCEPTION,
CLOSE
// FAILURE_CLIENT_CANCELLED,
// FAILURE_CLIENT_TIMEOUT;
// private final NfStatus nfStatus;
// private final int responseStatus;
//
// CompleteReason(NfStatus nfStatus, int responseStatus) {
// this.nfStatus = nfStatus;
// this.responseStatus = responseStatus;
// }
//
// CompleteReason() {
// //For status that never gets returned back to client, like channel inactive
// nfStatus = null;
// responseStatus = 501;
// }
//
// public NfStatus getNfStatus() {
// return nfStatus;
// }
//
// public int getResponseStatus() {
// return responseStatus;
// }
}
public static class StartEvent {
private final HttpRequest request;
public StartEvent(HttpRequest request) {
this.request = request;
}
public HttpRequest getRequest() {
return request;
}
}
public static class CompleteEvent {
private final CompleteReason reason;
private final HttpRequest request;
private final HttpResponse response;
public CompleteEvent(CompleteReason reason, HttpRequest request, HttpResponse response) {
this.reason = reason;
this.request = request;
this.response = response;
}
public CompleteReason getReason() {
return reason;
}
public HttpRequest getRequest() {
return request;
}
public HttpResponse getResponse() {
return response;
}
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/HttpRequestReadTimeoutEvent.java
================================================
/*
* Copyright 2018 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common;
/**
* Indicates a timeout in reading the full http request.
*
* ie. time between receiving request headers and LastHttpContent of request body.
*/
public class HttpRequestReadTimeoutEvent {
public static final HttpRequestReadTimeoutEvent INSTANCE = new HttpRequestReadTimeoutEvent();
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/HttpRequestReadTimeoutHandler.java
================================================
/*
* Copyright 2018 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common;
import com.netflix.spectator.api.Counter;
import com.netflix.zuul.passport.CurrentPassport;
import com.netflix.zuul.passport.PassportState;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.channel.ChannelPipeline;
import io.netty.handler.codec.http.HttpRequest;
import io.netty.handler.codec.http.LastHttpContent;
import io.netty.handler.timeout.ReadTimeoutHandler;
import java.util.concurrent.TimeUnit;
/**
* This handler times from the point a HttpRequest is read until the LastHttpContent is read,
* and fires a HttpRequestTimeoutEvent if that time has exceed the configured timeout.
*
* Unlike ReadTimeoutHandler, this impl does NOT close the channel on a timeout. Only fires the
* event.
*
* @author michaels
*/
public class HttpRequestReadTimeoutHandler extends ChannelInboundHandlerAdapter {
private static final String HANDLER_NAME = "http_request_read_timeout_handler";
private static final String INTERNAL_HANDLER_NAME = "http_request_read_timeout_internal";
private final long timeout;
private final TimeUnit unit;
private final Counter httpRequestReadTimeoutCounter;
protected HttpRequestReadTimeoutHandler(long timeout, TimeUnit unit, Counter httpRequestReadTimeoutCounter) {
this.timeout = timeout;
this.unit = unit;
this.httpRequestReadTimeoutCounter = httpRequestReadTimeoutCounter;
}
/**
* Factory which ensures that this handler is added to the pipeline using the
* correct name.
*/
public static void addLast(
ChannelPipeline pipeline, long timeout, TimeUnit unit, Counter httpRequestReadTimeoutCounter) {
HttpRequestReadTimeoutHandler handler =
new HttpRequestReadTimeoutHandler(timeout, unit, httpRequestReadTimeoutCounter);
pipeline.addLast(HANDLER_NAME, handler);
}
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
if (msg instanceof LastHttpContent) {
removeInternalHandler(ctx);
} else if (msg instanceof HttpRequest) {
// Start timeout handler.
InternalReadTimeoutHandler handler = new InternalReadTimeoutHandler(timeout, unit);
ctx.pipeline().addBefore(HANDLER_NAME, INTERNAL_HANDLER_NAME, handler);
}
super.channelRead(ctx, msg);
}
@Override
public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
if (evt instanceof HttpRequestReadTimeoutEvent) {
CurrentPassport.fromChannel(ctx.channel()).add(PassportState.IN_REQ_READ_TIMEOUT);
removeInternalHandler(ctx);
httpRequestReadTimeoutCounter.increment();
}
super.userEventTriggered(ctx, evt);
}
@Override
public void handlerRemoved(ChannelHandlerContext ctx) throws Exception {
removeInternalHandler(ctx);
super.handlerRemoved(ctx);
}
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
removeInternalHandler(ctx);
super.channelInactive(ctx);
}
protected void removeInternalHandler(ChannelHandlerContext ctx) {
// Remove timeout handler if not already removed.
ChannelHandlerContext handlerContext = ctx.pipeline().context(INTERNAL_HANDLER_NAME);
if (handlerContext != null && !handlerContext.isRemoved()) {
ctx.pipeline().remove(INTERNAL_HANDLER_NAME);
}
}
static class InternalReadTimeoutHandler extends ReadTimeoutHandler {
public InternalReadTimeoutHandler(long timeout, TimeUnit unit) {
super(timeout, unit);
}
@Override
protected void readTimedOut(ChannelHandlerContext ctx) throws Exception {
ctx.fireUserEventTriggered(HttpRequestReadTimeoutEvent.INSTANCE);
}
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/HttpServerLifecycleChannelHandler.java
================================================
/*
* Copyright 2018 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common;
import com.netflix.zuul.passport.PassportState;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.channel.ChannelOutboundHandlerAdapter;
import io.netty.channel.ChannelPromise;
import io.netty.handler.codec.http.HttpRequest;
import io.netty.handler.codec.http.HttpResponse;
import io.netty.handler.codec.http.HttpResponseStatus;
import io.netty.handler.codec.http.LastHttpContent;
import io.netty.util.ReferenceCountUtil;
import java.util.Objects;
/**
* @author michaels
*/
public final class HttpServerLifecycleChannelHandler extends HttpLifecycleChannelHandler {
public static final class HttpServerLifecycleInboundChannelHandler extends ChannelInboundHandlerAdapter {
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
if (msg instanceof HttpRequest) {
// Fire start event, and if that succeeded, then allow processing to
// continue to next handler in pipeline.
if (fireStartEvent(ctx, (HttpRequest) msg)) {
super.channelRead(ctx, msg);
} else {
ReferenceCountUtil.release(msg);
}
} else {
super.channelRead(ctx, msg);
}
}
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
fireCompleteEventIfNotAlready(ctx, CompleteReason.INACTIVE);
super.channelInactive(ctx);
}
}
public static final class HttpServerLifecycleOutboundChannelHandler extends ChannelOutboundHandlerAdapter {
@Override
public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception {
if (msg instanceof HttpResponse) {
ctx.channel().attr(ATTR_HTTP_RESP).set((HttpResponse) msg);
}
try {
super.write(ctx, msg, promise);
} finally {
if (msg instanceof LastHttpContent) {
boolean dontFireCompleteYet = false;
if (msg instanceof HttpResponse) {
// Handle case of 100 CONTINUE, where server sends an initial 100 status response to indicate to
// client
// that it can continue sending the initial request body.
// ie. in this case we don't want to consider the state to be COMPLETE until after the 2nd
// response.
if (Objects.equals(((HttpResponse) msg).status(), HttpResponseStatus.CONTINUE)) {
dontFireCompleteYet = true;
}
}
if (!dontFireCompleteYet) {
if (promise.isDone()) {
fireCompleteEventIfNotAlready(ctx, CompleteReason.SESSION_COMPLETE);
} else {
promise.addListener(future -> {
fireCompleteEventIfNotAlready(ctx, CompleteReason.SESSION_COMPLETE);
});
}
}
}
}
}
@Override
public void disconnect(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception {
fireCompleteEventIfNotAlready(ctx, CompleteReason.DISCONNECT);
super.disconnect(ctx, promise);
}
@Override
public void close(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception {
addPassportState(ctx, PassportState.SERVER_CH_CLOSE);
// This will likely expand based on more specific reasons for completion
if (ctx.channel()
.attr(HttpLifecycleChannelHandler.ATTR_HTTP_PIPELINE_REJECT)
.get()
== null) {
fireCompleteEventIfNotAlready(ctx, CompleteReason.CLOSE);
} else {
fireCompleteEventIfNotAlready(ctx, CompleteReason.PIPELINE_REJECT);
}
super.close(ctx, promise);
}
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/RequestResponseCompleteEvent.java
================================================
/*
* Copyright 2018 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common;
/**
* User: michaels@netflix.com
* Date: 5/24/16
* Time: 1:04 PM
*/
public class RequestResponseCompleteEvent {}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/SourceAddressChannelHandler.java
================================================
/*
* Copyright 2018 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common;
import com.google.common.annotations.VisibleForTesting;
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.util.AttributeKey;
import java.net.Inet4Address;
import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.net.UnknownHostException;
import javax.annotation.Nullable;
/**
* Stores the source IP address as an attribute of the channel. This has the advantage of allowing us to overwrite it if
* we have more info (eg. ELB sends a HAProxyMessage with info of REAL source host + port).
* <p>
* User: michaels@netflix.com Date: 4/14/16 Time: 4:29 PM
*/
@ChannelHandler.Sharable
public final class SourceAddressChannelHandler extends ChannelInboundHandlerAdapter {
/**
* Indicates the actual source (remote) address of the channel. This can be different than the one {@link Channel}
* returns if the connection is being proxied. (e.g. over HAProxy)
*/
public static final AttributeKey<SocketAddress> ATTR_REMOTE_ADDR = AttributeKey.newInstance("_remote_addr");
/**
* Indicates the destination address received from Proxy Protocol. Not set otherwise
*/
public static final AttributeKey<InetSocketAddress> ATTR_PROXY_PROTOCOL_DESTINATION_ADDRESS =
AttributeKey.newInstance("_proxy_protocol_destination_address");
/**
* Use {@link #ATTR_REMOTE_ADDR} instead.
*/
@Deprecated
public static final AttributeKey<InetSocketAddress> ATTR_SOURCE_INET_ADDR =
AttributeKey.newInstance("_source_inet_addr");
/**
* The host address of the source. This is derived from {@link #ATTR_REMOTE_ADDR}. If the address is an IPv6
* address, the scope identifier is absent.
*/
public static final AttributeKey<String> ATTR_SOURCE_ADDRESS = AttributeKey.newInstance("_source_address");
/**
* Indicates the local address of the channel. This can be different than the one {@link Channel} returns if the
* connection is being proxied. (e.g. over HAProxy)
*/
public static final AttributeKey<SocketAddress> ATTR_LOCAL_ADDR = AttributeKey.newInstance("_local_addr");
/**
* Use {@link #ATTR_LOCAL_ADDR} instead.
*/
@Deprecated
public static final AttributeKey<InetSocketAddress> ATTR_LOCAL_INET_ADDR =
AttributeKey.newInstance("_local_inet_addr");
/**
* The local address of this channel. This is derived from {@code channel.localAddress()}, or from the Proxy
* Protocol preface if provided. If the address is an IPv6 address, the scope identifier is absent. Unlike {@link
* #ATTR_SERVER_LOCAL_ADDRESS}, this value is overwritten with the Proxy Protocol local address (e.g. the LB's local
* address), if enabled.
*/
public static final AttributeKey<String> ATTR_LOCAL_ADDRESS = AttributeKey.newInstance("_local_address");
/**
* The actual local address of the channel, in string form. If the address is an IPv6 address, the scope identifier
* is absent. Unlike {@link #ATTR_LOCAL_ADDRESS}, this is not overwritten by the Proxy Protocol message if
* present.
*
* @deprecated Use {@code channel.localAddress()} instead.
*/
@Deprecated
public static final AttributeKey<String> ATTR_SERVER_LOCAL_ADDRESS =
AttributeKey.newInstance("_server_local_address");
/**
* The port number of the local socket, or {@code -1} if not appropriate. This is not overwritten by the Proxy
* Protocol message if present.
*/
public static final AttributeKey<Integer> ATTR_SERVER_LOCAL_PORT = AttributeKey.newInstance("_server_local_port");
@Override
public void channelActive(ChannelHandlerContext ctx) throws Exception {
ctx.channel().attr(ATTR_REMOTE_ADDR).set(ctx.channel().remoteAddress());
InetSocketAddress sourceAddress = sourceAddress(ctx.channel());
ctx.channel().attr(ATTR_SOURCE_INET_ADDR).setIfAbsent(sourceAddress);
ctx.channel().attr(ATTR_SOURCE_ADDRESS).setIfAbsent(getHostAddress(sourceAddress));
ctx.channel().attr(ATTR_LOCAL_ADDR).set(ctx.channel().localAddress());
InetSocketAddress localAddress = localAddress(ctx.channel());
ctx.channel().attr(ATTR_LOCAL_INET_ADDR).setIfAbsent(localAddress);
ctx.channel().attr(ATTR_LOCAL_ADDRESS).setIfAbsent(getHostAddress(localAddress));
// ATTR_LOCAL_ADDRESS and ATTR_LOCAL_PORT get overwritten with what is received in
// Proxy Protocol (via the LB), so set local server's address, port explicitly
ctx.channel()
.attr(ATTR_SERVER_LOCAL_ADDRESS)
.setIfAbsent(localAddress.getAddress().getHostAddress());
ctx.channel().attr(ATTR_SERVER_LOCAL_PORT).setIfAbsent(localAddress.getPort());
super.channelActive(ctx);
}
/**
* Returns the String form of a socket address, or {@code null} if there isn't one.
*/
@VisibleForTesting
@Nullable
static String getHostAddress(InetSocketAddress socketAddress) {
InetAddress address = socketAddress.getAddress();
if (address instanceof Inet6Address) {
// Strip the scope from the address since some other classes choke on it.
// TODO(carl-mastrangelo): Consider adding this back in once issues like
// https://github.com/google/guava/issues/2587 are fixed.
try {
return InetAddress.getByAddress(address.getAddress()).getHostAddress();
} catch (UnknownHostException e) {
throw new RuntimeException(e);
}
} else if (address instanceof Inet4Address) {
return address.getHostAddress();
} else {
assert address == null;
return null;
}
}
private InetSocketAddress sourceAddress(Channel channel) {
SocketAddress remoteSocketAddr = channel.remoteAddress();
if (remoteSocketAddr != null && InetSocketAddress.class.isAssignableFrom(remoteSocketAddr.getClass())) {
InetSocketAddress inetSocketAddress = (InetSocketAddress) remoteSocketAddr;
if (inetSocketAddress.getAddress() != null) {
return inetSocketAddress;
}
}
return null;
}
private InetSocketAddress localAddress(Channel channel) {
SocketAddress localSocketAddress = channel.localAddress();
if (localSocketAddress != null && InetSocketAddress.class.isAssignableFrom(localSocketAddress.getClass())) {
InetSocketAddress inetSocketAddress = (InetSocketAddress) localSocketAddress;
if (inetSocketAddress.getAddress() != null) {
return inetSocketAddress;
}
}
return null;
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/SslExceptionsHandler.java
================================================
/*
* Copyright 2023 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common;
import com.netflix.spectator.api.Registry;
import io.netty.channel.ChannelHandler.Sharable;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import javax.net.ssl.SSLHandshakeException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Swallow specific SSL related exceptions to avoid propagating deep stack traces up the pipeline.
*
* @author Argha C
* @since 4/17/23
*/
@Sharable
public class SslExceptionsHandler extends ChannelInboundHandlerAdapter {
private static final Logger logger = LoggerFactory.getLogger(SslExceptionsHandler.class);
private final Registry registry;
public SslExceptionsHandler(Registry registry) {
this.registry = registry;
}
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
// In certain cases, depending on the client, these stack traces can get very deep.
// We intentionally avoid propagating this up the pipeline, to avoid verbose disk logging.
if (cause.getCause() instanceof SSLHandshakeException) {
logger.debug("SSL handshake failed on channel {}", ctx.channel(), cause);
registry.counter("server.ssl.exception.swallowed", "cause", "SSLHandshakeException")
.increment();
} else {
super.exceptionCaught(ctx, cause);
}
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/SwallowSomeHttp2ExceptionsHandler.java
================================================
/*
* Copyright 2019 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common;
import com.netflix.spectator.api.Registry;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelOutboundHandlerAdapter;
import io.netty.channel.unix.Errors;
import io.netty.handler.codec.http2.Http2Error;
import io.netty.handler.codec.http2.Http2Exception;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ChannelHandler.Sharable
public class SwallowSomeHttp2ExceptionsHandler extends ChannelOutboundHandlerAdapter {
private static final Logger LOG = LoggerFactory.getLogger(SwallowSomeHttp2ExceptionsHandler.class);
private final Registry registry;
public SwallowSomeHttp2ExceptionsHandler(Registry registry) {
this.registry = registry;
}
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
incrementExceptionCounter(cause);
if (cause instanceof Http2Exception h2e) {
if (h2e.error() == Http2Error.NO_ERROR
&& h2e.shutdownHint().equals(Http2Exception.ShutdownHint.GRACEFUL_SHUTDOWN)) {
// This is the exception we threw ourselves to make the http2 codec gracefully close the connection. So
// just
// swallow it so that it doesn't propagate and get logged.
LOG.debug("Swallowed Http2Exception.ShutdownHint.GRACEFUL_SHUTDOWN ", cause);
} else {
super.exceptionCaught(ctx, cause);
}
} else if (cause instanceof Errors.NativeIoException) {
LOG.debug("Swallowed NativeIoException", cause);
} else {
super.exceptionCaught(ctx, cause);
}
}
private void incrementExceptionCounter(Throwable throwable) {
registry.counter(
"server.connection.pipeline.exception",
"id",
throwable.getClass().getSimpleName())
.increment();
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/accesslog/AccessLogChannelHandler.java
================================================
/*
* Copyright 2018 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common.accesslog;
import com.netflix.netty.common.HttpLifecycleChannelHandler;
import com.netflix.netty.common.SourceAddressChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.channel.ChannelOutboundHandlerAdapter;
import io.netty.channel.ChannelPromise;
import io.netty.handler.codec.http.HttpContent;
import io.netty.handler.codec.http.HttpRequest;
import io.netty.handler.codec.http.HttpResponse;
import io.netty.util.AttributeKey;
import java.time.LocalDateTime;
import java.time.ZoneId;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* User: michaels@netflix.com
* Date: 4/14/16
* Time: 3:51 PM
*/
public final class AccessLogChannelHandler {
private static final AttributeKey<RequestState> ATTR_REQ_STATE =
AttributeKey.newInstance("_accesslog_requeststate");
private static final Logger LOG = LoggerFactory.getLogger(AccessLogChannelHandler.class);
public static class AccessLogInboundChannelHandler extends ChannelInboundHandlerAdapter {
private final AccessLogPublisher publisher;
public AccessLogInboundChannelHandler(AccessLogPublisher publisher) {
this.publisher = publisher;
}
protected Integer getLocalPort(ChannelHandlerContext ctx) {
return ctx.channel()
.attr(SourceAddressChannelHandler.ATTR_SERVER_LOCAL_PORT)
.get();
}
protected String getRemoteIp(ChannelHandlerContext ctx) {
return ctx.channel()
.attr(SourceAddressChannelHandler.ATTR_SOURCE_ADDRESS)
.get();
}
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
if (msg instanceof HttpRequest) {
RequestState state = new RequestState();
state.request = (HttpRequest) msg;
state.startTimeNs = System.nanoTime();
state.requestBodySize = 0;
ctx.channel().attr(ATTR_REQ_STATE).set(state);
}
if (msg instanceof HttpContent) {
RequestState state = ctx.channel().attr(ATTR_REQ_STATE).get();
if (state != null) {
state.requestBodySize += ((HttpContent) msg).content().readableBytes();
}
}
super.channelRead(ctx, msg);
}
@Override
public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
if (evt instanceof HttpLifecycleChannelHandler.CompleteEvent) {
// Get the stored request, and remove the attr from channel to cleanup.
RequestState state = ctx.channel().attr(ATTR_REQ_STATE).get();
ctx.channel().attr(ATTR_REQ_STATE).set(null);
// Response complete, so now write to access log.
long durationNs = System.nanoTime() - state.startTimeNs;
Integer localPort = getLocalPort(ctx);
String remoteIp = getRemoteIp(ctx);
if (state.response == null) {
LOG.debug(
"Response null in AccessLog, Complete reason={}, duration={}, url={}, method={}",
((HttpLifecycleChannelHandler.CompleteEvent) evt).getReason(),
durationNs / (1000 * 1000),
state.request != null ? state.request.uri() : "-",
state.request != null ? state.request.method() : "-");
}
publisher.log(
ctx.channel(),
state.request,
state.response,
state.dateTime,
localPort,
remoteIp,
durationNs,
state.requestBodySize,
state.responseBodySize);
}
super.userEventTriggered(ctx, evt);
}
}
public static final class AccessLogOutboundChannelHandler extends ChannelOutboundHandlerAdapter {
@Override
public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception {
RequestState state = ctx.channel().attr(ATTR_REQ_STATE).get();
if (msg instanceof HttpResponse) {
state.response = (HttpResponse) msg;
state.responseBodySize = 0;
}
if (msg instanceof HttpContent) {
state.responseBodySize += ((HttpContent) msg).content().readableBytes();
}
super.write(ctx, msg, promise);
}
}
private static class RequestState {
final LocalDateTime dateTime = LocalDateTime.now(ZoneId.systemDefault());
HttpRequest request;
HttpResponse response;
long startTimeNs;
long requestBodySize = 0;
long responseBodySize = 0;
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/accesslog/AccessLogPublisher.java
================================================
/*
* Copyright 2018 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common.accesslog;
import com.netflix.config.DynamicIntProperty;
import com.netflix.config.DynamicStringListProperty;
import io.netty.channel.Channel;
import io.netty.handler.codec.http.HttpHeaders;
import io.netty.handler.codec.http.HttpRequest;
import io.netty.handler.codec.http.HttpResponse;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.List;
import java.util.Locale;
import java.util.function.BiFunction;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class AccessLogPublisher {
private static final char DELIM = '\t';
private static final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ISO_LOCAL_DATE_TIME;
private static final List<String> LOG_REQ_HEADERS = new DynamicStringListProperty(
"zuul.access.log.requestheaders",
"host,x-forwarded-for,x-forwarded-proto,x-forwarded-host,x-forwarded-port,user-agent")
.get();
private static final List<String> LOG_RESP_HEADERS =
new DynamicStringListProperty("zuul.access.log.responseheaders", "server,via,content-type").get();
private static final DynamicIntProperty URI_LENGTH_LIMIT =
new DynamicIntProperty("zuul.access.log.uri.length.limit", Integer.MAX_VALUE);
private final Logger logger;
private final BiFunction<Channel, HttpRequest, String> requestIdProvider;
private static final Logger LOG = LoggerFactory.getLogger(AccessLogPublisher.class);
public AccessLogPublisher(String loggerName, BiFunction<Channel, HttpRequest, String> requestIdProvider) {
this.logger = LoggerFactory.getLogger(loggerName);
this.requestIdProvider = requestIdProvider;
}
public void log(
Channel channel,
HttpRequest request,
HttpResponse response,
LocalDateTime dateTime,
Integer localPort,
String remoteIp,
Long durationNs,
Long requestBodySize,
Long responseBodySize) {
StringBuilder sb = new StringBuilder(512);
String dateTimeStr = dateTime != null ? dateTime.format(DATE_TIME_FORMATTER) : "-----T-:-:-";
String remoteIpStr = (remoteIp != null && !remoteIp.isEmpty()) ? remoteIp : "-";
String port = localPort != null ? localPort.toString() : "-";
String method = request != null ? request.method().toString().toUpperCase(Locale.ROOT) : "-";
String uri = request != null ? request.uri() : "-";
if (uri.length() > URI_LENGTH_LIMIT.get()) {
uri = uri.substring(0, URI_LENGTH_LIMIT.get());
}
String status = response != null ? String.valueOf(response.status().code()) : "-";
String requestId = null;
try {
requestId = requestIdProvider.apply(channel, request);
} catch (Exception ex) {
LOG.error(
"requestIdProvider failed in AccessLogPublisher method={}, uri={}, status={}", method, uri, status);
}
requestId = requestId != null ? requestId : "-";
// Convert duration to microseconds.
String durationStr = (durationNs != null && durationNs > 0) ? String.valueOf(durationNs / 1000) : "-";
String requestBodySizeStr = (requestBodySize != null && requestBodySize > 0) ? requestBodySize.toString() : "-";
String responseBodySizeStr =
(responseBodySize != null && responseBodySize > 0) ? responseBodySize.toString() : "-";
// Build the line.
sb.append(dateTimeStr)
.append(DELIM)
.append(remoteIpStr)
.append(DELIM)
.append(port)
.append(DELIM)
.append(method)
.append(DELIM)
.append(uri)
.append(DELIM)
.append(status)
.append(DELIM)
.append(durationStr)
.append(DELIM)
.append(responseBodySizeStr)
.append(DELIM)
.append(requestId)
.append(DELIM)
.append(requestBodySizeStr);
if (request != null && request.headers() != null) {
includeMatchingHeaders(sb, LOG_REQ_HEADERS, request.headers());
}
if (response != null && response.headers() != null) {
includeMatchingHeaders(sb, LOG_RESP_HEADERS, response.headers());
}
// Write to logger.
String access = sb.toString();
logger.info(access);
LOG.debug(access);
}
void includeMatchingHeaders(StringBuilder builder, List<String> requiredHeaders, HttpHeaders headers) {
for (String headerName : requiredHeaders) {
String value = headerAsString(headers, headerName);
builder.append(DELIM).append('\"').append(value).append('\"');
}
}
String headerAsString(HttpHeaders headers, String headerName) {
List<String> values = headers.getAll(headerName);
return values.isEmpty() ? "-" : String.join(",", values);
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/channel/config/ChannelConfig.java
================================================
/*
* Copyright 2018 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common.channel.config;
import java.util.HashMap;
import java.util.Map;
/**
* User: michaels@netflix.com
* Date: 2/8/17
* Time: 6:43 PM
*/
public class ChannelConfig implements Cloneable {
private final HashMap<ChannelConfigKey, ChannelConfigValue> parameters;
public ChannelConfig() {
parameters = new HashMap<>();
}
public ChannelConfig(Map<ChannelConfigKey, ChannelConfigValue> parameters) {
this.parameters = new HashMap<ChannelConfigKey, ChannelConfigValue>(parameters);
}
public void add(ChannelConfigValue param) {
this.parameters.put(param.key(), param);
}
public <T> void set(ChannelConfigKey<T> key, T value) {
this.parameters.put(key, new ChannelConfigValue<>(key, value));
}
public <T> T get(ChannelConfigKey<T> key) {
ChannelConfigValue<T> ccv = parameters.get(key);
T value = ccv == null ? null : (T) ccv.value();
if (value == null) {
value = key.defaultValue();
}
return value;
}
public <T> ChannelConfigValue<T> getConfig(ChannelConfigKey<T> key) {
return (ChannelConfigValue<T>) parameters.get(key);
}
public <T> boolean contains(ChannelConfigKey<T> key) {
return parameters.containsKey(key);
}
@Override
public ChannelConfig clone() {
return new ChannelConfig(parameters);
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/channel/config/ChannelConfigKey.java
================================================
/*
* Copyright 2018 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common.channel.config;
/**
* User: michaels@netflix.com
* Date: 2/8/17
* Time: 6:17 PM
*/
public class ChannelConfigKey<T> {
private final String key;
private final T defaultValue;
public ChannelConfigKey(String key, T defaultValue) {
this.key = key;
this.defaultValue = defaultValue;
}
public ChannelConfigKey(String key) {
this.key = key;
this.defaultValue = null;
}
public String key() {
return key;
}
public T defaultValue() {
return defaultValue;
}
public boolean hasDefaultValue() {
return defaultValue != null;
}
@Override
public String toString() {
return "ChannelConfigKey{" + "key='" + key + '\'' + ", defaultValue=" + defaultValue + '}';
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/channel/config/ChannelConfigValue.java
================================================
/*
* Copyright 2018 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common.channel.config;
/**
* User: michaels@netflix.com
* Date: 2/8/17
* Time: 6:41 PM
*/
public class ChannelConfigValue<T> {
private final ChannelConfigKey<T> key;
private final T value;
public ChannelConfigValue(ChannelConfigKey<T> key, T value) {
this.key = key;
this.value = value;
}
public ChannelConfigKey<T> key() {
return key;
}
public T value() {
return value;
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/channel/config/CommonChannelConfigKeys.java
================================================
/*
* Copyright 2018 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common.channel.config;
import com.netflix.netty.common.proxyprotocol.StripUntrustedProxyHeadersHandler;
import com.netflix.netty.common.ssl.ServerSslConfig;
import com.netflix.zuul.netty.server.ServerTimeout;
import com.netflix.zuul.netty.ssl.SslContextFactory;
import io.netty.handler.ssl.SslContext;
import io.netty.util.AsyncMapping;
/**
* User: michaels@netflix.com
* Date: 2/8/17
* Time: 6:21 PM
*/
public class CommonChannelConfigKeys {
public static final ChannelConfigKey<Boolean> withProxyProtocol =
new ChannelConfigKey<>("withProxyProtocol", false);
public static final ChannelConfigKey<StripUntrustedProxyHeadersHandler.AllowWhen> allowProxyHeadersWhen =
new ChannelConfigKey<>("allowProxyHeadersWhen", StripUntrustedProxyHeadersHandler.AllowWhen.ALWAYS);
public static final ChannelConfigKey<Boolean> preferProxyProtocolForClientIp =
new ChannelConfigKey<>("preferProxyProtocolForClientIp", true);
/** The Idle timeout of a connection, in milliseconds */
public static final ChannelConfigKey<Integer> idleTimeout = new ChannelConfigKey<>("idleTimeout", 65000);
public static final ChannelConfigKey<ServerTimeout> serverTimeout = new ChannelConfigKey<>("serverTimeout");
/** The HTTP request read timeout, in milliseconds */
public static final ChannelConfigKey<Integer> httpRequestReadTimeout =
new ChannelConfigKey<>("httpRequestReadTimeout", 5000);
/** The maximum number of inbound connections to proxy. */
public static final ChannelConfigKey<Integer> maxConnections = new ChannelConfigKey<>("maxConnections", 20000);
public static final ChannelConfigKey<Integer> maxRequestsPerConnection =
new ChannelConfigKey<>("maxRequestsPerConnection", 4000);
public static final ChannelConfigKey<Integer> maxRequestsPerConnectionInBrownout =
new ChannelConfigKey<>("maxRequestsPerConnectionInBrownout", 100);
public static final ChannelConfigKey<Integer> connectionExpiry =
new ChannelConfigKey<>("connectionExpiry", 20 * 60 * 1000);
// SSL:
public static final ChannelConfigKey<Boolean> isSSlFromIntermediary =
new ChannelConfigKey<>("isSSlFromIntermediary", false);
public static final ChannelConfigKey<ServerSslConfig> serverSslConfig = new ChannelConfigKey<>("serverSslConfig");
public static final ChannelConfigKey<SslContextFactory> sslContextFactory =
new ChannelConfigKey<>("sslContextFactory");
public static final ChannelConfigKey<AsyncMapping<String, SslContext>> sniMapping =
new ChannelConfigKey<>("sniMapping");
// HTTP/2 specific:
public static final ChannelConfigKey<Integer> maxConcurrentStreams =
new ChannelConfigKey<>("maxConcurrentStreams", 100);
public static final ChannelConfigKey<Integer> initialWindowSize =
new ChannelConfigKey<>("initialWindowSize", 5242880); // 5MB
/* The amount of time to wait before closing a connection that has the `Connection: Close` header, in seconds */
public static final ChannelConfigKey<Integer> connCloseDelay = new ChannelConfigKey<>("connCloseDelay", 10);
public static final ChannelConfigKey<Integer> maxHttp2HeaderTableSize =
new ChannelConfigKey<>("maxHttp2HeaderTableSize", 4096);
public static final ChannelConfigKey<Integer> maxHttp2HeaderListSize =
new ChannelConfigKey<>("maxHttp2HeaderListSize");
public static final ChannelConfigKey<Boolean> http2AllowGracefulDelayed =
new ChannelConfigKey<>("http2AllowGracefulDelayed", true);
public static final ChannelConfigKey<Boolean> http2SwallowUnknownExceptionsOnConnClose =
new ChannelConfigKey<>("http2SwallowUnknownExceptionsOnConnClose", false);
public static final ChannelConfigKey<Boolean> http2CatchConnectionErrors =
new ChannelConfigKey<>("http2CatchConnectionErrors", true);
public static final ChannelConfigKey<Integer> http2EncoderMaxResetFrames =
new ChannelConfigKey<>("http2EncoderMaxResetFrames", 200);
public static final ChannelConfigKey<Integer> http2EncoderMaxResetFramesWindow =
new ChannelConfigKey<>("http2EncoderMaxResetFramesWindow", 30);
public static final ChannelConfigKey<Boolean> http2ConnectProtocolEnabled =
new ChannelConfigKey<>("http2ConnectProtocolEnabled", false);
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/http2/DynamicHttp2FrameLogger.java
================================================
/*
* Copyright 2018 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common.http2;
import com.google.errorprone.annotations.FormatMethod;
import com.google.errorprone.annotations.FormatString;
import com.netflix.config.DynamicStringSetProperty;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufUtil;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.http2.Http2Flags;
import io.netty.handler.codec.http2.Http2FrameLogger;
import io.netty.handler.codec.http2.Http2Headers;
import io.netty.handler.codec.http2.Http2Settings;
import io.netty.handler.logging.LogLevel;
import io.netty.util.AttributeKey;
import io.netty.util.internal.ObjectUtil;
import io.netty.util.internal.logging.InternalLogLevel;
import io.netty.util.internal.logging.InternalLogger;
import io.netty.util.internal.logging.InternalLoggerFactory;
public class DynamicHttp2FrameLogger extends Http2FrameLogger {
public static final AttributeKey<Object> ATTR_ENABLE = AttributeKey.valueOf("http2.frame.logger.enabled");
private static final int BUFFER_LENGTH_THRESHOLD = 64;
private static final DynamicStringSetProperty FRAMES_TO_LOG = new DynamicStringSetProperty(
"server.http2.logger.framestolog",
"SETTINGS,WINDOW_UPDATE,HEADERS,GO_AWAY,RST_STREAM,PRIORITY,PING,PUSH_PROMISE");
private final InternalLogger logger;
private final InternalLogLevel level;
public DynamicHttp2FrameLogger(LogLevel level, Class<?> clazz) {
super(level, clazz);
this.level = ObjectUtil.checkNotNull(level.toInternalLevel(), "level");
this.logger = ObjectUtil.checkNotNull(InternalLoggerFactory.getInstance(clazz), "logger");
}
protected boolean enabled(ChannelHandlerContext ctx) {
return ctx.channel().hasAttr(ATTR_ENABLE);
}
protected boolean enabled() {
return logger.isEnabled(level);
}
@Override
public void logData(
Direction direction,
ChannelHandlerContext ctx,
int streamId,
ByteBuf data,
int padding,
boolean endStream) {
if (enabled()) {
log(
direction,
"DATA",
ctx,
"streamId=%d, endStream=%b, length=%d",
streamId,
endStream,
data.readableBytes());
}
}
@Override
public void logHeaders(
Direction direction,
ChannelHandlerContext ctx,
int streamId,
Http2Headers headers,
int padding,
boolean endStream) {
if (enabled()) {
log(direction, "HEADERS", ctx, "streamId=%d, headers=%s, endStream=%b", streamId, headers, endStream);
}
}
@Override
public void logHeaders(
Direction direction,
ChannelHandlerContext ctx,
int streamId,
Http2Headers headers,
int streamDependency,
short weight,
boolean exclusive,
int padding,
boolean endStream) {
if (enabled()) {
log(
direction,
"HEADERS",
ctx,
"streamId=%d, headers=%s, streamDependency=%d, weight=%d, " + "exclusive=%b, endStream=%b",
streamId,
headers,
streamDependency,
weight,
exclusive,
endStream);
}
}
@Override
public void logPriority(
Direction direction,
ChannelHandlerContext ctx,
int streamId,
int streamDependency,
short weight,
boolean exclusive) {
if (enabled()) {
log(
direction,
"PRIORITY",
ctx,
"streamId=%d, streamDependency=%d, weight=%d, exclusive=%b",
streamId,
streamDependency,
weight,
exclusive);
}
}
@Override
public void logRstStream(Direction direction, ChannelHandlerContext ctx, int streamId, long errorCode) {
if (enabled()) {
log(direction, "RST_STREAM", ctx, "streamId=%d, errorCode=%d", streamId, errorCode);
}
}
@Override
public void logSettingsAck(Direction direction, ChannelHandlerContext ctx) {
if (enabled()) {
log(direction, "SETTINGS", ctx, "ack=true");
}
}
@Override
public void logSettings(Direction direction, ChannelHandlerContext ctx, Http2Settings settings) {
if (enabled()) {
log(direction, "SETTINGS", ctx, "ack=false, settings=%s", settings);
}
}
@Override
public void logPing(Direction direction, ChannelHandlerContext ctx, long data) {
if (enabled()) {
log(direction, "PING", ctx, "ack=false, length=%d", data);
}
}
@Override
public void logPingAck(Direction direction, ChannelHandlerContext ctx, long data) {
if (enabled()) {
log(direction, "PING", ctx, "ack=true, length=%d", data);
}
}
@Override
public void logPushPromise(
Direction direction,
ChannelHandlerContext ctx,
int streamId,
int promisedStreamId,
Http2Headers headers,
int padding) {
if (enabled()) {
log(
direction,
"PUSH_PROMISE",
ctx,
"streamId=%d, promisedStreamId=%d, headers=%s, padding=%d",
streamId,
promisedStreamId,
headers,
padding);
}
}
@Override
public void logGoAway(
Direction direction, ChannelHandlerContext ctx, int lastStreamId, long errorCode, ByteBuf debugData) {
if (enabled()) {
log(
direction,
"GO_AWAY",
ctx,
"lastStreamId=%d, errorCode=%d, length=%d, bytes=%s",
lastStreamId,
errorCode,
debugData.readableBytes(),
toString(debugData));
}
}
@Override
public void logWindowsUpdate(
Direction direction, ChannelHandlerContext ctx, int streamId, int windowSizeIncrement) {
if (enabled()) {
log(direction, "WINDOW_UPDATE", ctx, "streamId=%d, windowSizeIncrement=%d", streamId, windowSizeIncrement);
}
}
@Override
public void logUnknownFrame(
Direction direction,
ChannelHandlerContext ctx,
byte frameType,
int streamId,
Http2Flags flags,
ByteBuf data) {
if (enabled()) {
log(
direction,
"UNKNOWN",
ctx,
"frameType=%d, streamId=%d, flags=%d, length=%d, bytes=%s",
frameType & 0xFF,
streamId,
flags.value(),
data.readableBytes(),
toString(data));
}
}
private String toString(ByteBuf buf) {
if (level == InternalLogLevel.TRACE || buf.readableBytes() <= BUFFER_LENGTH_THRESHOLD) {
// Log the entire buffer.
return ByteBufUtil.hexDump(buf);
}
// Otherwise just log the first 64 bytes.
int length = Math.min(buf.readableBytes(), BUFFER_LENGTH_THRESHOLD);
return ByteBufUtil.hexDump(buf, buf.readerIndex(), length) + "...";
}
@FormatMethod
private void log(
Direction direction, String frame, ChannelHandlerContext ctx, @FormatString String format, Object... args) {
if (shouldLogFrame(frame)) {
StringBuilder b = new StringBuilder(200)
.append(direction.name())
.append(": ")
.append(frame)
.append(": ")
.append(String.format(format, args))
.append(" -- ")
.append(String.valueOf(ctx.channel()));
logger.log(level, b.toString());
}
}
protected boolean shouldLogFrame(String frame) {
return FRAMES_TO_LOG.get().contains(frame);
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/metrics/EventLoopGroupMetrics.java
================================================
/*
* Copyright 2018 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common.metrics;
import com.netflix.spectator.api.Registry;
import jakarta.inject.Inject;
import jakarta.inject.Singleton;
import java.util.HashMap;
import java.util.Map;
/**
* User: michaels@netflix.com
* Date: 2/7/17
* Time: 3:17 PM
*/
@Singleton
public class EventLoopGroupMetrics {
private final ThreadLocal<EventLoopMetrics> metricsForCurrentThread;
private final Map<Thread, EventLoopMetrics> byEventLoop = new HashMap<>();
@Inject
public EventLoopGroupMetrics(Registry registry) {
this.metricsForCurrentThread = ThreadLocal.withInitial(() -> {
String name = nameForCurrentEventLoop();
EventLoopMetrics metrics = new EventLoopMetrics(registry, name);
byEventLoop.put(Thread.currentThread(), metrics);
return metrics;
});
}
public Map<Thread, Integer> connectionsPerEventLoop() {
Map<Thread, Integer> map = new HashMap<>(byEventLoop.size());
for (Map.Entry<Thread, EventLoopMetrics> entry : byEventLoop.entrySet()) {
map.put(entry.getKey(), entry.getValue().currentConnectionsCount());
}
return map;
}
public Map<Thread, Integer> httpRequestsPerEventLoop() {
Map<Thread, Integer> map = new HashMap<>(byEventLoop.size());
for (Map.Entry<Thread, EventLoopMetrics> entry : byEventLoop.entrySet()) {
map.put(entry.getKey(), entry.getValue().currentHttpRequestsCount());
}
return map;
}
public EventLoopMetrics getForCurrentEventLoop() {
return metricsForCurrentThread.get();
}
private static String nameForCurrentEventLoop() {
// We're relying on the knowledge that we name the eventloop threads consistently.
String threadName = Thread.currentThread().getName();
String parts[] = threadName.split("-ClientToZuulWorker-", -1);
if (parts.length == 2) {
return parts[1];
}
return threadName;
}
interface EventLoopInfo {
int currentConnectionsCount();
int currentHttpRequestsCount();
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/metrics/EventLoopMetrics.java
================================================
/*
* Copyright 2018 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common.metrics;
import com.netflix.spectator.api.Id;
import com.netflix.spectator.api.Registry;
import java.util.concurrent.atomic.AtomicInteger;
/**
* User: michaels@netflix.com
* Date: 2/7/17
* Time: 3:18 PM
*/
public class EventLoopMetrics implements EventLoopGroupMetrics.EventLoopInfo {
private final String name;
public final AtomicInteger currentRequests = new AtomicInteger(0);
public final AtomicInteger currentConnections = new AtomicInteger(0);
private final Registry registry;
private final Id currentRequestsId;
private final Id currentConnectionsId;
public EventLoopMetrics(Registry registry, String eventLoopName) {
this.name = eventLoopName;
this.registry = registry;
this.currentRequestsId = this.registry.createId("server.eventloop.http.requests.current");
this.currentConnectionsId = this.registry.createId("server.eventloop.connections.current");
}
@Override
public int currentConnectionsCount() {
return currentConnections.get();
}
@Override
public int currentHttpRequestsCount() {
return currentRequests.get();
}
public void incrementCurrentRequests() {
int value = this.currentRequests.incrementAndGet();
updateGauge(currentRequestsId, value);
}
public void decrementCurrentRequests() {
int value = this.currentRequests.decrementAndGet();
updateGauge(currentRequestsId, value);
}
public void incrementCurrentConnections() {
int value = this.currentConnections.incrementAndGet();
updateGauge(currentConnectionsId, value);
}
public void decrementCurrentConnections() {
int value = this.currentConnections.decrementAndGet();
updateGauge(currentConnectionsId, value);
}
private void updateGauge(Id gaugeId, int value) {
registry.gauge(gaugeId.withTag("eventloop", name)).set(value);
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/metrics/Http2MetricsChannelHandlers.java
================================================
/*
* Copyright 2018 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common.metrics;
import com.netflix.spectator.api.Registry;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.channel.ChannelOutboundHandlerAdapter;
import io.netty.channel.ChannelPromise;
import io.netty.handler.codec.http2.Http2Exception;
import io.netty.handler.codec.http2.Http2Frame;
import io.netty.handler.codec.http2.Http2GoAwayFrame;
import io.netty.handler.codec.http2.Http2ResetFrame;
public class Http2MetricsChannelHandlers {
private final Inbound inbound;
private final Outbound outbound;
public Http2MetricsChannelHandlers(Registry registry, String metricPrefix, String metricId) {
super();
this.inbound = new Inbound(registry, metricId, metricPrefix);
this.outbound = new Outbound(registry, metricId, metricPrefix);
}
public Inbound inbound() {
return inbound;
}
public Outbound outbound() {
return outbound;
}
protected void incrementErrorCounter(Registry registry, String counterName, String metricId, Http2Exception h2e) {
String h2Error = h2e.error() != null ? h2e.error().name() : "NA";
String exceptionName = h2e.getClass().getSimpleName();
registry.counter(counterName, "id", metricId, "error", h2Error, "exception", exceptionName)
.increment();
}
protected void incrementCounter(Registry registry, String counterName, String metricId, Http2Frame frame) {
long errorCode;
if (frame instanceof Http2ResetFrame) {
errorCode = ((Http2ResetFrame) frame).errorCode();
} else if (frame instanceof Http2GoAwayFrame) {
errorCode = ((Http2GoAwayFrame) frame).errorCode();
} else {
errorCode = -1;
}
registry.counter(counterName, "id", metricId, "frame", frame.name(), "error_code", Long.toString(errorCode))
.increment();
}
@ChannelHandler.Sharable
private class Inbound extends ChannelInboundHandlerAdapter {
private final Registry registry;
private final String metricId;
private final String frameCounterName;
private final String errorCounterName;
public Inbound(Registry registry, String metricId, String metricPrefix) {
this.registry = registry;
this.metricId = metricId;
this.frameCounterName = metricPrefix + ".http2.frame.inbound";
this.errorCounterName = metricPrefix + ".http2.error.inbound";
}
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
try {
if (msg instanceof Http2Frame) {
incrementCounter(registry, frameCounterName, metricId, (Http2Frame) msg);
}
} finally {
super.channelRead(ctx, msg);
}
}
@Override
public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
try {
if (evt instanceof Http2Frame) {
incrementCounter(registry, frameCounterName, metricId, (Http2Frame) evt);
}
} finally {
super.userEventTriggered(ctx, evt);
}
}
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
try {
if (cause instanceof Http2Exception) {
incrementErrorCounter(registry, errorCounterName, metricId, (Http2Exception) cause);
}
} finally {
super.exceptionCaught(ctx, cause);
}
}
}
@ChannelHandler.Sharable
private class Outbound extends ChannelOutboundHandlerAdapter {
private final Registry registry;
private final String metricId;
private final String frameCounterName;
private final String errorCounterName;
public Outbound(Registry registry, String metricId, String metricPrefix) {
this.registry = registry;
this.metricId = metricId;
this.frameCounterName = metricPrefix + ".http2.frame.outbound";
this.errorCounterName = metricPrefix + ".http2.error.outbound";
}
@Override
public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception {
super.write(ctx, msg, promise);
if (msg instanceof Http2Frame) {
incrementCounter(registry, frameCounterName, metricId, (Http2Frame) msg);
}
}
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
try {
if (cause instanceof Http2Exception) {
incrementErrorCounter(registry, errorCounterName, metricId, (Http2Exception) cause);
}
} finally {
super.exceptionCaught(ctx, cause);
}
}
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/metrics/HttpBodySizeRecordingChannelHandler.java
================================================
/*
* Copyright 2018 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common.metrics;
import com.netflix.netty.common.HttpLifecycleChannelHandler;
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.channel.ChannelOutboundHandlerAdapter;
import io.netty.channel.ChannelPromise;
import io.netty.handler.codec.http.HttpContent;
import io.netty.handler.codec.http.HttpRequest;
import io.netty.util.AttributeKey;
import jakarta.inject.Provider;
/**
* User: michaels@netflix.com
* Date: 4/14/16
* Time: 3:51 PM
*/
public final class HttpBodySizeRecordingChannelHandler {
private static final AttributeKey<State> ATTR_STATE = AttributeKey.newInstance("_http_body_size_state");
public static Provider<Long> getCurrentInboundBodySize(Channel ch) {
return new InboundBodySizeProvider(ch);
}
public static Provider<Long> getCurrentOutboundBodySize(Channel ch) {
return new OutboundBodySizeProvider(ch);
}
private static State getOrCreateCurrentState(Channel ch) {
State state = ch.attr(ATTR_STATE).get();
if (state == null) {
state = createNewState(ch);
}
return state;
}
private static State createNewState(Channel ch) {
State state = new State();
ch.attr(ATTR_STATE).set(state);
return state;
}
public static final class InboundChannelHandler extends ChannelInboundHandlerAdapter {
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
State state = null;
// Reset the state as each new inbound request comes in.
if (msg instanceof HttpRequest) {
state = createNewState(ctx.channel());
}
// Update the inbound body size with this chunk.
if (msg instanceof HttpContent) {
if (state == null) {
state = getOrCreateCurrentState(ctx.channel());
}
state.inboundBodySize += ((HttpContent) msg).content().readableBytes();
}
super.channelRead(ctx, msg);
}
@Override
public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
try {
super.userEventTriggered(ctx, evt);
} finally {
if (evt instanceof HttpLifecycleChannelHandler.CompleteEvent) {
ctx.channel().attr(ATTR_STATE).set(null);
}
}
}
}
public static final class OutboundChannelHandler extends ChannelOutboundHandlerAdapter {
@Override
public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception {
State state = null;
// Reset the state as each new outbound request goes out.
if (msg instanceof HttpRequest) {
state = createNewState(ctx.channel());
}
// Update the outbound body size with this chunk.
if (msg instanceof HttpContent) {
if (state == null) {
state = getOrCreateCurrentState(ctx.channel());
}
state.outboundBodySize += ((HttpContent) msg).content().readableBytes();
}
super.write(ctx, msg, promise);
}
}
private static class State {
long inboundBodySize = 0;
long outboundBodySize = 0;
}
static class InboundBodySizeProvider implements Provider<Long> {
private final Channel channel;
public InboundBodySizeProvider(Channel channel) {
this.channel = channel;
}
@Override
public Long get() {
State state = getOrCreateCurrentState(channel);
return state == null ? 0 : state.inboundBodySize;
}
}
static class OutboundBodySizeProvider implements Provider<Long> {
private final Channel channel;
public OutboundBodySizeProvider(Channel channel) {
this.channel = channel;
}
@Override
public Long get() {
State state = getOrCreateCurrentState(channel);
return state == null ? 0 : state.outboundBodySize;
}
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/metrics/HttpMetricsChannelHandler.java
================================================
/*
* Copyright 2018 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common.metrics;
import com.netflix.netty.common.HttpLifecycleChannelHandler;
import com.netflix.netty.common.HttpLifecycleChannelHandler.CompleteEvent;
import com.netflix.netty.common.HttpLifecycleChannelHandler.CompleteReason;
import com.netflix.spectator.api.Counter;
import com.netflix.spectator.api.Gauge;
import com.netflix.spectator.api.Registry;
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.util.AttributeKey;
import java.util.concurrent.atomic.AtomicInteger;
/**
* User: michaels@netflix.com
* Date: 4/14/16
* Time: 3:51 PM
*/
@ChannelHandler.Sharable
public class HttpMetricsChannelHandler extends ChannelInboundHandlerAdapter {
private static final AttributeKey<Object> ATTR_REQ_INFLIGHT = AttributeKey.newInstance("_httpmetrics_inflight");
private static final Object INFLIGHT = "is_inflight";
private static final AttributeKey<AtomicInteger> ATTR_CURRENT_REQS =
AttributeKey.newInstance("_server_http_current_count");
private final AtomicInteger currentRequests = new AtomicInteger(0);
private final Registry registry;
private final Gauge currentRequestsGauge;
private final Counter unSupportedPipeliningCounter;
public HttpMetricsChannelHandler(Registry registry, String name, String id) {
super();
this.registry = registry;
this.currentRequestsGauge =
this.registry.gauge(this.registry.createId(name + ".http.requests.current", "id", id));
this.unSupportedPipeliningCounter = this.registry.counter(name + ".http.requests.pipelining.dropped", "id", id);
}
public static int getInflightRequestCountFromChannel(Channel ch) {
AtomicInteger current = ch.attr(ATTR_CURRENT_REQS).get();
return current == null ? 0 : current.get();
}
public int getInflightRequestsCount() {
return currentRequests.get();
}
@Override
public void channelActive(ChannelHandlerContext ctx) throws Exception {
// Store a ref to the count of current inflight requests onto this channel. So that
// other code can query it using getInflightRequestCountFromChannel().
ctx.channel().attr(ATTR_CURRENT_REQS).set(currentRequests);
super.channelActive(ctx);
}
@Override
public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
if (evt instanceof HttpLifecycleChannelHandler.StartEvent) {
incrementCurrentRequestsInFlight(ctx);
} else if (evt instanceof CompleteEvent
&& ((CompleteEvent) evt).getReason() == CompleteReason.PIPELINE_REJECT) {
unSupportedPipeliningCounter.increment();
} else if (evt instanceof CompleteEvent) {
decrementCurrentRequestsIfOneInflight(ctx);
}
super.userEventTriggered(ctx, evt);
}
private void incrementCurrentRequestsInFlight(ChannelHandlerContext ctx) {
currentRequestsGauge.set(currentRequests.incrementAndGet());
ctx.channel().attr(ATTR_REQ_INFLIGHT).set(INFLIGHT);
}
private void decrementCurrentRequestsIfOneInflight(ChannelHandlerContext ctx) {
if (ctx.channel().attr(ATTR_REQ_INFLIGHT).getAndSet(null) != null) {
currentRequestsGauge.set(currentRequests.decrementAndGet());
}
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/metrics/InstrumentedResourceLeakDetector.java
================================================
/*
* Copyright 2018 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common.metrics;
import com.google.common.annotations.VisibleForTesting;
import com.netflix.zuul.netty.SpectatorUtils;
import io.netty.util.ResourceLeakDetector;
import java.lang.reflect.Field;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
/**
* Pluggable ResourceLeakDetector to track metrics for leaks
*
* Author: Arthur Gonigberg
* Date: September 20, 2016
*/
public class InstrumentedResourceLeakDetector<T> extends ResourceLeakDetector<T> {
@VisibleForTesting
final AtomicInteger leakCounter;
public InstrumentedResourceLeakDetector(Class<?> resourceType, int samplingInterval) {
super(resourceType, samplingInterval);
this.leakCounter =
SpectatorUtils.newGauge("NettyLeakDetector", resourceType.getSimpleName(), new AtomicInteger());
}
public InstrumentedResourceLeakDetector(Class<?> resourceType, int samplingInterval, long maxActive) {
this(resourceType, samplingInterval);
}
@Override
protected void reportTracedLeak(String resourceType, String records) {
super.reportTracedLeak(resourceType, records);
leakCounter.incrementAndGet();
resetReportedLeaks();
}
@Override
protected void reportUntracedLeak(String resourceType) {
super.reportUntracedLeak(resourceType);
leakCounter.incrementAndGet();
resetReportedLeaks();
}
/**
* This private field in the superclass needs to be reset so that we can continue reporting leaks even
* if they're duplicates. This is ugly but ideally should not be called frequently (or at all).
*/
private void resetReportedLeaks() {
try {
Field reportedLeaks = ResourceLeakDetector.class.getDeclaredField("reportedLeaks");
reportedLeaks.setAccessible(true);
Object f = reportedLeaks.get(this);
if (f instanceof Map) {
((Map) f).clear();
}
} catch (Throwable t) {
// do nothing
}
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/metrics/PerEventLoopMetricsChannelHandler.java
================================================
/*
* Copyright 2018 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common.metrics;
import com.netflix.netty.common.HttpLifecycleChannelHandler;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.util.AttributeKey;
/**
* User: michaels@netflix.com
* Date: 2/6/17
* Time: 2:21 PM
*/
public class PerEventLoopMetricsChannelHandler {
private static final AttributeKey<Object> ATTR_REQ_INFLIGHT =
AttributeKey.newInstance("_eventloop_metrics_inflight");
private static final Object INFLIGHT = "eventloop_is_inflight";
private final EventLoopGroupMetrics groupMetrics;
public PerEventLoopMetricsChannelHandler(EventLoopGroupMetrics groupMetrics) {
this.groupMetrics = groupMetrics;
}
@ChannelHandler.Sharable
public class Connections extends ChannelInboundHandlerAdapter {
@Override
public void channelActive(ChannelHandlerContext ctx) throws Exception {
groupMetrics.getForCurrentEventLoop().incrementCurrentConnections();
super.channelActive(ctx);
}
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
try {
super.channelInactive(ctx);
} finally {
groupMetrics.getForCurrentEventLoop().decrementCurrentConnections();
}
}
}
@ChannelHandler.Sharable
public class HttpRequests extends ChannelInboundHandlerAdapter {
@Override
public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
if (evt instanceof HttpLifecycleChannelHandler.StartEvent) {
incrementCurrentRequestsInFlight(ctx);
} else if (evt instanceof HttpLifecycleChannelHandler.CompleteEvent) {
decrementCurrentRequestsIfOneInflight(ctx);
}
super.userEventTriggered(ctx, evt);
}
private void incrementCurrentRequestsInFlight(ChannelHandlerContext ctx) {
groupMetrics.getForCurrentEventLoop().incrementCurrentRequests();
ctx.channel().attr(ATTR_REQ_INFLIGHT).set(INFLIGHT);
}
private void decrementCurrentRequestsIfOneInflight(ChannelHandlerContext ctx) {
if (ctx.channel().attr(ATTR_REQ_INFLIGHT).getAndSet(null) != null) {
groupMetrics.getForCurrentEventLoop().decrementCurrentRequests();
}
}
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandler.java
================================================
/*
* Copyright 2018 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common.proxyprotocol;
import com.google.common.base.Preconditions;
import com.netflix.netty.common.SourceAddressChannelHandler;
import com.netflix.spectator.api.Registry;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.channel.ChannelPipeline;
import io.netty.handler.codec.ProtocolDetectionState;
import io.netty.handler.codec.haproxy.HAProxyMessageDecoder;
/**
* Decides if we need to decode a HAProxyMessage. If so, adds the decoder followed by the handler.
* Else, removes itself from the pipeline.
*/
public final class ElbProxyProtocolChannelHandler extends ChannelInboundHandlerAdapter {
public static final String NAME = ElbProxyProtocolChannelHandler.class.getSimpleName();
private final boolean withProxyProtocol;
private final Registry registry;
public ElbProxyProtocolChannelHandler(Registry registry, boolean withProxyProtocol) {
this.withProxyProtocol = withProxyProtocol;
this.registry = Preconditions.checkNotNull(registry);
}
public void addProxyProtocol(ChannelPipeline pipeline) {
pipeline.addLast(NAME, this);
}
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
if (!withProxyProtocol) {
ctx.pipeline().remove(this);
super.channelRead(ctx, msg);
return;
}
ProtocolDetectionState haProxyState = getDetectionState(msg);
if (haProxyState == ProtocolDetectionState.DETECTED) {
ctx.pipeline()
.addAfter(NAME, null, new HAProxyMessageChannelHandler())
.replace(this, null, new HAProxyMessageDecoder());
} else {
int port = ctx.channel()
.attr(SourceAddressChannelHandler.ATTR_SERVER_LOCAL_PORT)
.get();
// This likely means initialization was requested with proxy protocol, but we encountered a non-ppv2
// message
registry.counter(
"zuul.hapm.decode",
"success",
"false",
"port",
String.valueOf(port),
"needs_more_data",
String.valueOf(haProxyState == ProtocolDetectionState.NEEDS_MORE_DATA))
.increment();
ctx.pipeline().remove(this);
}
super.channelRead(ctx, msg);
}
private ProtocolDetectionState getDetectionState(Object msg) {
return HAProxyMessageDecoder.detectProtocol((ByteBuf) msg).state();
}
}
================================================
FILE: zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandler.java
================================================
/*
* Copyright 2018 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.netty.common.proxyprotocol;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.net.InetAddresses;
import com.netflix.netty.common.SourceAddressChannelHandler;
import com.netflix.zuul.Attrs;
import com.netflix.zuul.netty.server.Server;
import io.netty.channel.Channel;
import io.netty.channel.ChannelFutureListener;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.handler.codec.haproxy.HAProxyMessage;
import io.netty.handler.codec.haproxy.HAProxyProtocolVersion;
import io.netty.handler.codec.haproxy.HAProxyTLV;
import io.netty.util.AttributeKey;
import java.net.Inet4Address;
import java.net.Inet6Address;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.util.List;
import java.util.stream.Collectors;
/**
* Copies any decoded HAProxyMessage into the channel attributes, and doesn't pass it any further along the pipeline.
* Use in conjunction with HAProxyMessageDecoder if proxy protocol is enabled on the ELB.
*/
public final class HAProxyMessageChannelHandler extends ChannelInboundHandlerAdapter {
public static final AttributeKey<HAProxyMessage> ATTR_HAPROXY_MESSAGE =
AttributeKey.newInstance("_haproxy_message");
public static final AttributeKey<HAProxyProtocolVersion> ATTR_HAPROXY_VERSION =
AttributeKey.newInstance("_haproxy_version");
public static final AttributeKey<List<HAProxyTLV>> ATTR_HAPROXY_CUSTOM_TLVS =
AttributeKey.newInstance("_haproxy_tlvs");
@VisibleForTesting
static final Attrs.Key<Integer> HAPM_DEST_PORT = Attrs.newKey("hapm_port");
@VisibleForTesting
static final Attrs.Key<String> HAPM_DEST_IP_VERSION = Attrs.newKey("hapm_dst_ipproto");
@VisibleForTesting
static final Attrs.Key<String> HAPM_SRC_IP_VERSION = Attrs.newKey("hapm_src_ipproto");
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) {
if (msg instanceof HAProxyMessage hapm) {
Channel channel = ctx.channel();
channel.attr(ATTR_HAPROXY_MESSAGE).set(hapm);
ctx.channel().closeFuture().addListener((ChannelFutureListener) future -> hapm.release());
channel.attr(ATTR_HAPROXY_VERSION).set(hapm.protocolVersion());
// Parse and persist any custom TLVs that might be part of the connection
List<HAProxyTLV> tlvList = hapm.tlvs().stream()
.filter(tlv -> tlv.type() == HAProxyTLV.Type.OTHER)
.collect(Collectors.toList());
channel.attr(ATTR_HAPROXY_CUSTOM_TLVS).set(tlvList);
// Get the real host and port that the client connected with.
parseDstAddr(hapm, channel);
parseSrcAddr(hapm, channel);
// Remove ourselves (this handler) from the channel now, as this is conn. level info
ctx.pipeline().remove(this);
}
}
private void parseSrcAddr(HAProxyMessage hapm, Channel channel) {
String sourceAddress = hapm.sourceAddress();
if (sourceAddress != null) {
channel.attr(SourceAddressChannelHandler.ATTR_SOURCE_ADDRESS).set(sourceAddress);
SocketAddress srcAddr;
switch (hapm.proxiedProtocol()) {
case UNKNOWN:
throw new IllegalArgumentException("unknown proxy protocol" + sourceAddress);
case TCP4:
case TCP6:
InetSocketAddress inetAddr;
srcAddr =
inetAddr = new InetSocketAddress(InetAddresses.forString(sourceAddress), hapm.sourcePort());
Attrs attrs = channel.attr(Server.CONN_DIMENSIONS).get();
if (inetAddr.getAddress() instanceof Inet4Address) {
HAPM_SRC_IP_VERSION.put(attrs, "v4");
} else if (inetAddr.getAddress() instanceof Inet6Address) {
HAPM_SRC_IP_VERSION.put(attrs, "v6");
} else {
HAPM_SRC_IP_VERSION.put(attrs, "unknown");
}
break;
case UNIX_STREAM: // TODO: implement
case UDP4:
case UDP6:
case UNIX_DGRAM:
t
gitextract_tnrhk04n/
├── .github/
│ ├── CODEOWNERS
│ ├── dependabot.yml
│ └── workflows/
│ ├── benchmark.yml
│ ├── branch_snapshot.yml
│ ├── gradle-wrapper-validation.yml
│ ├── pr.yml
│ ├── release.yml
│ ├── snapshot.yml
│ └── stale.yml
├── .gitignore
├── .netflixoss
├── CHANGELOG.md
├── LICENSE
├── OSSMETADATA
├── README.md
├── build.gradle
├── codequality/
│ └── checkstyle.xml
├── gradle/
│ └── wrapper/
│ └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
├── zuul-core/
│ ├── build.gradle
│ └── src/
│ ├── jmh/
│ │ └── java/
│ │ └── com/
│ │ └── netflix/
│ │ └── zuul/
│ │ └── message/
│ │ └── HeadersBenchmark.java
│ ├── main/
│ │ └── java/
│ │ └── com/
│ │ └── netflix/
│ │ ├── config/
│ │ │ ├── DynamicIntegerSetProperty.java
│ │ │ └── PatternListStringProperty.java
│ │ ├── netty/
│ │ │ └── common/
│ │ │ ├── AbstrHttpConnectionExpiryHandler.java
│ │ │ ├── ByteBufUtil.java
│ │ │ ├── CategorizedThreadFactory.java
│ │ │ ├── CloseOnIdleStateHandler.java
│ │ │ ├── ConnectionCloseChannelAttributes.java
│ │ │ ├── ConnectionCloseType.java
│ │ │ ├── Http1ConnectionCloseHandler.java
│ │ │ ├── Http1ConnectionExpiryHandler.java
│ │ │ ├── Http2ConnectionCloseHandler.java
│ │ │ ├── Http2ConnectionExpiryHandler.java
│ │ │ ├── HttpChannelFlags.java
│ │ │ ├── HttpClientLifecycleChannelHandler.java
│ │ │ ├── HttpLifecycleChannelHandler.java
│ │ │ ├── HttpRequestReadTimeoutEvent.java
│ │ │ ├── HttpRequestReadTimeoutHandler.java
│ │ │ ├── HttpServerLifecycleChannelHandler.java
│ │ │ ├── RequestResponseCompleteEvent.java
│ │ │ ├── SourceAddressChannelHandler.java
│ │ │ ├── SslExceptionsHandler.java
│ │ │ ├── SwallowSomeHttp2ExceptionsHandler.java
│ │ │ ├── accesslog/
│ │ │ │ ├── AccessLogChannelHandler.java
│ │ │ │ └── AccessLogPublisher.java
│ │ │ ├── channel/
│ │ │ │ └── config/
│ │ │ │ ├── ChannelConfig.java
│ │ │ │ ├── ChannelConfigKey.java
│ │ │ │ ├── ChannelConfigValue.java
│ │ │ │ └── CommonChannelConfigKeys.java
│ │ │ ├── http2/
│ │ │ │ └── DynamicHttp2FrameLogger.java
│ │ │ ├── metrics/
│ │ │ │ ├── EventLoopGroupMetrics.java
│ │ │ │ ├── EventLoopMetrics.java
│ │ │ │ ├── Http2MetricsChannelHandlers.java
│ │ │ │ ├── HttpBodySizeRecordingChannelHandler.java
│ │ │ │ ├── HttpMetricsChannelHandler.java
│ │ │ │ ├── InstrumentedResourceLeakDetector.java
│ │ │ │ └── PerEventLoopMetricsChannelHandler.java
│ │ │ ├── proxyprotocol/
│ │ │ │ ├── ElbProxyProtocolChannelHandler.java
│ │ │ │ ├── HAProxyMessageChannelHandler.java
│ │ │ │ └── StripUntrustedProxyHeadersHandler.java
│ │ │ ├── ssl/
│ │ │ │ ├── ServerSslConfig.java
│ │ │ │ └── SslHandshakeInfo.java
│ │ │ ├── status/
│ │ │ │ └── ServerStatusManager.java
│ │ │ └── throttle/
│ │ │ ├── MaxInboundConnectionsHandler.java
│ │ │ ├── RejectionType.java
│ │ │ ├── RejectionUtils.java
│ │ │ └── RequestRejectedEvent.java
│ │ └── zuul/
│ │ ├── Attrs.java
│ │ ├── BasicFilterUsageNotifier.java
│ │ ├── BasicRequestCompleteHandler.java
│ │ ├── DefaultFilterFactory.java
│ │ ├── DynamicFilterLoader.java
│ │ ├── ExecutionStatus.java
│ │ ├── Filter.java
│ │ ├── FilterCategory.java
│ │ ├── FilterConstraint.java
│ │ ├── FilterFactory.java
│ │ ├── FilterFileManager.java
│ │ ├── FilterLoader.java
│ │ ├── FilterUsageNotifier.java
│ │ ├── RequestCompleteHandler.java
│ │ ├── StaticFilterLoader.java
│ │ ├── ZuulApplicationInfo.java
│ │ ├── constants/
│ │ │ ├── ZuulConstants.java
│ │ │ └── ZuulHeaders.java
│ │ ├── context/
│ │ │ ├── CommonContextKeys.java
│ │ │ ├── Debug.java
│ │ │ ├── SessionCleaner.java
│ │ │ ├── SessionContext.java
│ │ │ ├── SessionContextDecorator.java
│ │ │ ├── SessionContextFactory.java
│ │ │ └── ZuulSessionContextDecorator.java
│ │ ├── exception/
│ │ │ ├── ErrorType.java
│ │ │ ├── OutboundErrorType.java
│ │ │ ├── OutboundException.java
│ │ │ ├── RequestExpiredException.java
│ │ │ ├── ZuulException.java
│ │ │ └── ZuulFilterConcurrencyExceededException.java
│ │ ├── filters/
│ │ │ ├── BaseFilter.java
│ │ │ ├── BaseSyncFilter.java
│ │ │ ├── Endpoint.java
│ │ │ ├── FilterError.java
│ │ │ ├── FilterRegistry.java
│ │ │ ├── FilterSyncType.java
│ │ │ ├── FilterType.java
│ │ │ ├── MutableFilterRegistry.java
│ │ │ ├── ShouldFilter.java
│ │ │ ├── SyncZuulFilter.java
│ │ │ ├── SyncZuulFilterAdapter.java
│ │ │ ├── ZuulFilter.java
│ │ │ ├── common/
│ │ │ │ ├── GZipResponseFilter.java
│ │ │ │ └── SurgicalDebugFilter.java
│ │ │ ├── endpoint/
│ │ │ │ ├── EndpointLifecycle.java
│ │ │ │ ├── MissingEndpointHandlingFilter.java
│ │ │ │ └── ProxyEndpoint.java
│ │ │ ├── http/
│ │ │ │ ├── HttpInboundFilter.java
│ │ │ │ ├── HttpInboundSyncFilter.java
│ │ │ │ ├── HttpOutboundFilter.java
│ │ │ │ ├── HttpOutboundSyncFilter.java
│ │ │ │ └── HttpSyncEndpoint.java
│ │ │ └── passport/
│ │ │ ├── InboundPassportStampingFilter.java
│ │ │ ├── OutboundPassportStampingFilter.java
│ │ │ └── PassportStampingFilter.java
│ │ ├── logging/
│ │ │ └── Http2FrameLoggingPerClientIpHandler.java
│ │ ├── message/
│ │ │ ├── Header.java
│ │ │ ├── HeaderName.java
│ │ │ ├── Headers.java
│ │ │ ├── ZuulMessage.java
│ │ │ ├── ZuulMessageImpl.java
│ │ │ ├── http/
│ │ │ │ ├── Cookies.java
│ │ │ │ ├── HttpHeaderNames.java
│ │ │ │ ├── HttpHeaderNamesCache.java
│ │ │ │ ├── HttpQueryParams.java
│ │ │ │ ├── HttpRequestInfo.java
│ │ │ │ ├── HttpRequestMessage.java
│ │ │ │ ├── HttpRequestMessageImpl.java
│ │ │ │ ├── HttpResponseInfo.java
│ │ │ │ ├── HttpResponseMessage.java
│ │ │ │ └── HttpResponseMessageImpl.java
│ │ │ └── util/
│ │ │ └── HttpRequestBuilder.java
│ │ ├── metrics/
│ │ │ ├── OriginStats.java
│ │ │ └── OriginStatsFactory.java
│ │ ├── monitoring/
│ │ │ ├── ConnCounter.java
│ │ │ ├── ConnTimer.java
│ │ │ ├── MonitoringHelper.java
│ │ │ ├── Tracer.java
│ │ │ └── TracerFactory.java
│ │ ├── netty/
│ │ │ ├── ChannelUtils.java
│ │ │ ├── NettyRequestAttemptFactory.java
│ │ │ ├── RequestCancelledEvent.java
│ │ │ ├── SpectatorUtils.java
│ │ │ ├── connectionpool/
│ │ │ │ ├── BasicRequestStat.java
│ │ │ │ ├── ClientChannelManager.java
│ │ │ │ ├── ClientTimeoutHandler.java
│ │ │ │ ├── ConnectionPoolConfig.java
│ │ │ │ ├── ConnectionPoolConfigImpl.java
│ │ │ │ ├── ConnectionPoolHandler.java
│ │ │ │ ├── ConnectionPoolMetrics.java
│ │ │ │ ├── DefaultClientChannelManager.java
│ │ │ │ ├── DefaultOriginChannelInitializer.java
│ │ │ │ ├── IConnectionPool.java
│ │ │ │ ├── NettyClientConnectionFactory.java
│ │ │ │ ├── OriginChannelInitializer.java
│ │ │ │ ├── OriginConnectException.java
│ │ │ │ ├── PerServerConnectionPool.java
│ │ │ │ ├── PooledConnection.java
│ │ │ │ ├── PooledConnectionFactory.java
│ │ │ │ ├── RequestStat.java
│ │ │ │ └── ZuulNettyExceptionMapper.java
│ │ │ ├── filter/
│ │ │ │ ├── BaseZuulFilterRunner.java
│ │ │ │ ├── EventExecutorScheduler.java
│ │ │ │ ├── FilterConstraints.java
│ │ │ │ ├── FilterRunner.java
│ │ │ │ ├── ZuulEndPointRunner.java
│ │ │ │ ├── ZuulFilterChainHandler.java
│ │ │ │ └── ZuulFilterChainRunner.java
│ │ │ ├── insights/
│ │ │ │ ├── PassportLoggingHandler.java
│ │ │ │ ├── PassportStateHttpClientHandler.java
│ │ │ │ ├── PassportStateHttpServerHandler.java
│ │ │ │ ├── PassportStateListener.java
│ │ │ │ ├── PassportStateOriginHandler.java
│ │ │ │ └── ServerStateHandler.java
│ │ │ ├── ratelimiting/
│ │ │ │ └── NullChannelHandlerProvider.java
│ │ │ ├── server/
│ │ │ │ ├── BaseServerStartup.java
│ │ │ │ ├── BaseZuulChannelInitializer.java
│ │ │ │ ├── ClientConnectionsShutdown.java
│ │ │ │ ├── ClientRequestReceiver.java
│ │ │ │ ├── ClientResponseWriter.java
│ │ │ │ ├── DefaultEventLoopConfig.java
│ │ │ │ ├── DirectMemoryMonitor.java
│ │ │ │ ├── EventLoopConfig.java
│ │ │ │ ├── Http1MutualSslChannelInitializer.java
│ │ │ │ ├── ListenerSpec.java
│ │ │ │ ├── MethodBinding.java
│ │ │ │ ├── NamedSocketAddress.java
│ │ │ │ ├── OriginResponseReceiver.java
│ │ │ │ ├── Server.java
│ │ │ │ ├── ServerTimeout.java
│ │ │ │ ├── SocketAddressProperty.java
│ │ │ │ ├── ZuulDependencyKeys.java
│ │ │ │ ├── ZuulServerChannelInitializer.java
│ │ │ │ ├── http2/
│ │ │ │ │ ├── DummyChannelHandler.java
│ │ │ │ │ ├── Http2Configuration.java
│ │ │ │ │ ├── Http2ConnectionErrorHandler.java
│ │ │ │ │ ├── Http2ContentLengthEnforcingHandler.java
│ │ │ │ │ ├── Http2OrHttpHandler.java
│ │ │ │ │ ├── Http2ResetFrameHandler.java
│ │ │ │ │ ├── Http2SslChannelInitializer.java
│ │ │ │ │ ├── Http2StreamErrorHandler.java
│ │ │ │ │ ├── Http2StreamHeaderCleaner.java
│ │ │ │ │ └── Http2StreamInitializer.java
│ │ │ │ ├── psk/
│ │ │ │ │ ├── ClientPSKIdentityInfo.java
│ │ │ │ │ ├── ExternalTlsPskProvider.java
│ │ │ │ │ ├── PskCreationFailureException.java
│ │ │ │ │ ├── TlsPskDecoder.java
│ │ │ │ │ ├── TlsPskHandler.java
│ │ │ │ │ ├── TlsPskServerProtocol.java
│ │ │ │ │ ├── TlsPskUtils.java
│ │ │ │ │ └── ZuulPskServer.java
│ │ │ │ ├── push/
│ │ │ │ │ ├── PushAuthHandler.java
│ │ │ │ │ ├── PushChannelInitializer.java
│ │ │ │ │ ├── PushClientProtocolHandler.java
│ │ │ │ │ ├── PushConnection.java
│ │ │ │ │ ├── PushConnectionRegistry.java
│ │ │ │ │ ├── PushMessageFactory.java
│ │ │ │ │ ├── PushMessageSender.java
│ │ │ │ │ ├── PushMessageSenderInitializer.java
│ │ │ │ │ ├── PushProtocol.java
│ │ │ │ │ ├── PushRegistrationHandler.java
│ │ │ │ │ └── PushUserAuth.java
│ │ │ │ └── ssl/
│ │ │ │ └── SslHandshakeInfoHandler.java
│ │ │ ├── ssl/
│ │ │ │ ├── BaseSslContextFactory.java
│ │ │ │ ├── ClientSslContextFactory.java
│ │ │ │ └── SslContextFactory.java
│ │ │ └── timeouts/
│ │ │ ├── HttpHeadersTimeoutHandler.java
│ │ │ └── OriginTimeoutManager.java
│ │ ├── niws/
│ │ │ ├── RequestAttempt.java
│ │ │ └── RequestAttempts.java
│ │ ├── origins/
│ │ │ ├── BasicNettyOrigin.java
│ │ │ ├── BasicNettyOriginManager.java
│ │ │ ├── InstrumentedOrigin.java
│ │ │ ├── NettyOrigin.java
│ │ │ ├── Origin.java
│ │ │ ├── OriginConcurrencyExceededException.java
│ │ │ ├── OriginManager.java
│ │ │ ├── OriginName.java
│ │ │ └── OriginThrottledException.java
│ │ ├── passport/
│ │ │ ├── CurrentPassport.java
│ │ │ ├── PassportItem.java
│ │ │ ├── PassportState.java
│ │ │ └── StartAndEnd.java
│ │ ├── plugins/
│ │ │ └── Tracer.java
│ │ ├── stats/
│ │ │ ├── AmazonInfoHolder.java
│ │ │ ├── BasicRequestMetricsPublisher.java
│ │ │ ├── ErrorStatsData.java
│ │ │ ├── ErrorStatsManager.java
│ │ │ ├── NamedCountingMonitor.java
│ │ │ ├── RequestMetricsPublisher.java
│ │ │ ├── RouteStatusCodeMonitor.java
│ │ │ ├── StatsManager.java
│ │ │ ├── monitoring/
│ │ │ │ ├── Monitor.java
│ │ │ │ ├── MonitorRegistry.java
│ │ │ │ └── NamedCount.java
│ │ │ └── status/
│ │ │ ├── StatusCategory.java
│ │ │ ├── StatusCategoryGroup.java
│ │ │ ├── StatusCategoryUtils.java
│ │ │ ├── ZuulStatusCategory.java
│ │ │ └── ZuulStatusCategoryGroup.java
│ │ └── util/
│ │ ├── Gzipper.java
│ │ ├── HttpUtils.java
│ │ ├── JsonUtility.java
│ │ ├── ProxyUtils.java
│ │ └── VipUtils.java
│ └── test/
│ └── java/
│ └── com/
│ └── netflix/
│ ├── netty/
│ │ └── common/
│ │ ├── CloseOnIdleStateHandlerTest.java
│ │ ├── HttpServerLifecycleChannelHandlerTest.java
│ │ ├── SourceAddressChannelHandlerTest.java
│ │ ├── metrics/
│ │ │ └── InstrumentedResourceLeakDetectorTest.java
│ │ ├── proxyprotocol/
│ │ │ ├── ElbProxyProtocolChannelHandlerTest.java
│ │ │ ├── HAProxyMessageChannelHandlerTest.java
│ │ │ └── StripUntrustedProxyHeadersHandlerTest.java
│ │ ├── ssl/
│ │ │ └── ServerSslConfigTest.java
│ │ └── throttle/
│ │ └── MaxInboundConnectionsHandlerTest.java
│ └── zuul/
│ ├── AttrsTest.java
│ ├── DynamicFilterLoaderTest.java
│ ├── StaticFilterLoaderTest.java
│ ├── com/
│ │ └── netflix/
│ │ └── zuul/
│ │ └── netty/
│ │ └── server/
│ │ └── push/
│ │ └── PushConnectionTest.java
│ ├── context/
│ │ ├── DebugTest.java
│ │ └── SessionContextTest.java
│ ├── filters/
│ │ ├── BaseFilterTest.java
│ │ ├── common/
│ │ │ └── GZipResponseFilterTest.java
│ │ └── endpoint/
│ │ └── ProxyEndpointTest.java
│ ├── message/
│ │ ├── HeadersTest.java
│ │ ├── ZuulMessageImplTest.java
│ │ └── http/
│ │ ├── CookiesTest.java
│ │ ├── HttpQueryParamsTest.java
│ │ ├── HttpRequestMessageImplTest.java
│ │ └── HttpResponseMessageImplTest.java
│ ├── monitoring/
│ │ ├── ConnCounterTest.java
│ │ └── ConnTimerTest.java
│ ├── netty/
│ │ ├── NettyRequestAttemptFactoryTest.java
│ │ ├── connectionpool/
│ │ │ ├── ClientTimeoutHandlerTest.java
│ │ │ ├── ConnectionPoolConfigImplTest.java
│ │ │ ├── ConnectionPoolMetricsTest.java
│ │ │ ├── DefaultClientChannelManagerTest.java
│ │ │ ├── PerServerConnectionPoolTest.java
│ │ │ └── PooledConnectionTest.java
│ │ ├── filter/
│ │ │ ├── BaseZuulFilterRunnerTest.java
│ │ │ ├── EventExecutorSchedulerTest.java
│ │ │ ├── FilterConstraintsTest.java
│ │ │ ├── ZuulEndPointRunnerTest.java
│ │ │ └── ZuulFilterChainRunnerTest.java
│ │ ├── insights/
│ │ │ └── ServerStateHandlerTest.java
│ │ ├── server/
│ │ │ ├── BaseZuulChannelInitializerTest.java
│ │ │ ├── ClientConnectionsShutdownTest.java
│ │ │ ├── ClientRequestReceiverTest.java
│ │ │ ├── ClientResponseWriterTest.java
│ │ │ ├── IoUringTest.java
│ │ │ ├── OriginResponseReceiverTest.java
│ │ │ ├── ServerTest.java
│ │ │ ├── SocketAddressPropertyTest.java
│ │ │ ├── http2/
│ │ │ │ ├── Http2ConnectionErrorHandlerTest.java
│ │ │ │ ├── Http2ContentLengthEnforcingHandlerTest.java
│ │ │ │ └── Http2OrHttpHandlerTest.java
│ │ │ ├── push/
│ │ │ │ ├── PushAuthHandlerTest.java
│ │ │ │ ├── PushConnectionRegistryTest.java
│ │ │ │ ├── PushMessageSenderInitializerTest.java
│ │ │ │ └── PushRegistrationHandlerTest.java
│ │ │ └── ssl/
│ │ │ └── SslHandshakeInfoHandlerTest.java
│ │ ├── ssl/
│ │ │ ├── BaseSslContextFactoryTest.java
│ │ │ ├── ClientSslContextFactoryTest.java
│ │ │ └── OpenSslTest.java
│ │ └── timeouts/
│ │ ├── HttpHeadersTimeoutHandlerTest.java
│ │ └── OriginTimeoutManagerTest.java
│ ├── niws/
│ │ └── RequestAttemptTest.java
│ ├── origins/
│ │ └── OriginNameTest.java
│ ├── passport/
│ │ └── CurrentPassportTest.java
│ ├── stats/
│ │ ├── ErrorStatsDataTest.java
│ │ ├── ErrorStatsManagerTest.java
│ │ ├── RouteStatusCodeMonitorTest.java
│ │ ├── StatsManagerTest.java
│ │ └── status/
│ │ └── ZuulStatusCategoryTest.java
│ └── util/
│ ├── HttpUtilsTest.java
│ ├── JsonUtilityTest.java
│ └── VipUtilsTest.java
├── zuul-discovery/
│ ├── build.gradle
│ └── src/
│ ├── main/
│ │ └── java/
│ │ └── com/
│ │ └── netflix/
│ │ └── zuul/
│ │ ├── discovery/
│ │ │ ├── DiscoveryResult.java
│ │ │ ├── DynamicServerResolver.java
│ │ │ ├── NonDiscoveryServer.java
│ │ │ ├── ResolverResult.java
│ │ │ └── SimpleMetaInfo.java
│ │ └── resolver/
│ │ ├── Resolver.java
│ │ └── ResolverListener.java
│ └── test/
│ └── java/
│ └── com/
│ └── netflix/
│ └── zuul/
│ └── discovery/
│ ├── DiscoveryResultTest.java
│ └── DynamicServerResolverTest.java
├── zuul-integration-test/
│ ├── build.gradle
│ └── src/
│ └── test/
│ ├── java/
│ │ └── com/
│ │ └── netflix/
│ │ ├── netty/
│ │ │ └── common/
│ │ │ └── metrics/
│ │ │ └── CustomLeakDetector.java
│ │ └── zuul/
│ │ └── integration/
│ │ ├── BaseIntegrationTest.java
│ │ ├── MultiEventLoopIntegrationTest.java
│ │ ├── SingleEventLoopIntegrationTest.java
│ │ ├── ZuulServerExtension.java
│ │ └── server/
│ │ ├── Bootstrap.java
│ │ ├── HeaderNames.java
│ │ ├── OriginServerList.java
│ │ ├── ServerStartup.java
│ │ ├── TestUtil.java
│ │ └── filters/
│ │ ├── BodyUtil.java
│ │ ├── CrossThreadBoundaryFilter.java
│ │ ├── InboundRoutesFilter.java
│ │ ├── NeedsBodyBufferedInboundFilter.java
│ │ ├── NeedsBodyBufferedOutboundFilter.java
│ │ ├── RequestHeaderFilter.java
│ │ └── ResponseHeaderFilter.java
│ └── resources/
│ └── log4j2-test.xml
├── zuul-processor/
│ ├── build.gradle
│ └── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── netflix/
│ │ │ └── zuul/
│ │ │ └── filters/
│ │ │ └── processor/
│ │ │ └── FilterProcessor.java
│ │ └── resources/
│ │ └── META-INF/
│ │ ├── gradle/
│ │ │ └── incremental.annotation.processors
│ │ └── services/
│ │ └── javax.annotation.processing.Processor
│ └── test/
│ └── java/
│ └── com/
│ └── netflix/
│ └── zuul/
│ └── filters/
│ └── processor/
│ ├── FilterProcessorTest.java
│ ├── TestFilter.java
│ ├── TopLevelFilter.java
│ ├── override/
│ │ ├── SubpackageFilter.java
│ │ └── package-info.java
│ └── subpackage/
│ └── OverrideFilter.java
└── zuul-sample/
├── build.gradle
└── src/
└── main/
├── java/
│ └── com/
│ └── netflix/
│ └── zuul/
│ └── sample/
│ ├── Bootstrap.java
│ ├── SampleServerStartup.java
│ ├── SampleService.java
│ ├── filters/
│ │ ├── Debug.java
│ │ ├── endpoint/
│ │ │ └── Healthcheck.java
│ │ ├── inbound/
│ │ │ ├── DebugRequest.java
│ │ │ ├── Routes.java
│ │ │ └── SampleServiceFilter.java
│ │ └── outbound/
│ │ └── ZuulResponseFilter.java
│ └── push/
│ ├── SamplePushAuthHandler.java
│ ├── SamplePushMessageSender.java
│ ├── SamplePushMessageSenderInitializer.java
│ ├── SamplePushUserAuth.java
│ ├── SampleSSEPushChannelInitializer.java
│ ├── SampleSSEPushClientProtocolHandler.java
│ ├── SampleWebSocketPushChannelInitializer.java
│ └── SampleWebSocketPushClientProtocolHandler.java
└── resources/
├── application-benchmark.properties
├── application-test.properties
├── application.properties
├── log4j2.xml
└── ssl/
├── client.cert
├── client.key
├── server.cert
├── server.key
├── truststore.jks
└── truststore.key
Showing preview only (258K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (3110 symbols across 371 files)
FILE: zuul-core/src/jmh/java/com/netflix/zuul/message/HeadersBenchmark.java
class HeadersBenchmark (line 32) | @State(Scope.Thread)
class AddHeaders (line 35) | @State(Scope.Thread)
method setUp (line 47) | @Setup
method addHeaders_string (line 65) | @Benchmark
method addHeaders_headerName (line 76) | @Benchmark
class GetSetHeaders (line 88) | @State(Scope.Thread)
method setUp (line 101) | @Setup
method setHeader_first (line 121) | @Benchmark
method setHeader_last (line 128) | @Benchmark
method getHeader_first (line 135) | @Benchmark
method getHeader_last (line 142) | @Benchmark
method entries (line 149) | @Benchmark
method newHeaders (line 159) | @Benchmark
FILE: zuul-core/src/main/java/com/netflix/config/DynamicIntegerSetProperty.java
class DynamicIntegerSetProperty (line 21) | public class DynamicIntegerSetProperty extends DynamicSetProperty<Intege...
method DynamicIntegerSetProperty (line 22) | public DynamicIntegerSetProperty(String propName, String defaultValue) {
method DynamicIntegerSetProperty (line 26) | public DynamicIntegerSetProperty(String propName, String defaultValue,...
method DynamicIntegerSetProperty (line 30) | public DynamicIntegerSetProperty(String propName, Set<Integer> default...
method DynamicIntegerSetProperty (line 34) | public DynamicIntegerSetProperty(String propName, Set<Integer> default...
method from (line 38) | @Override
FILE: zuul-core/src/main/java/com/netflix/config/PatternListStringProperty.java
class PatternListStringProperty (line 30) | public class PatternListStringProperty extends DerivedStringProperty<Lis...
method PatternListStringProperty (line 33) | public PatternListStringProperty(String name, String defaultValue) {
method derive (line 37) | @Override
FILE: zuul-core/src/main/java/com/netflix/netty/common/AbstrHttpConnectionExpiryHandler.java
class AbstrHttpConnectionExpiryHandler (line 35) | public abstract class AbstrHttpConnectionExpiryHandler extends ChannelOu...
method AbstrHttpConnectionExpiryHandler (line 49) | public AbstrHttpConnectionExpiryHandler(
method write (line 61) | @Override
method isConnectionExpired (line 80) | protected boolean isConnectionExpired(Channel channel) {
method isResponseHeaders (line 93) | protected abstract boolean isResponseHeaders(Object msg);
method maxRequests (line 95) | protected int maxRequests(Channel ch) {
FILE: zuul-core/src/main/java/com/netflix/netty/common/ByteBufUtil.java
class ByteBufUtil (line 30) | public class ByteBufUtil {
method touch (line 36) | public static void touch(ReferenceCounted byteBuf, String hint, ZuulMe...
method touch (line 42) | public static void touch(ReferenceCounted byteBuf, String hint) {
method touch (line 48) | public static void touch(ReferenceCounted byteBuf, String hint, String...
method touch (line 54) | public static void touch(HttpResponse originResponse, String hint, Zuu...
FILE: zuul-core/src/main/java/com/netflix/netty/common/CategorizedThreadFactory.java
class CategorizedThreadFactory (line 27) | public class CategorizedThreadFactory implements ThreadFactory {
method CategorizedThreadFactory (line 31) | public CategorizedThreadFactory(String category) {
method newThread (line 36) | @Override
FILE: zuul-core/src/main/java/com/netflix/netty/common/CloseOnIdleStateHandler.java
class CloseOnIdleStateHandler (line 24) | public class CloseOnIdleStateHandler extends ChannelInboundHandlerAdapter {
method CloseOnIdleStateHandler (line 28) | public CloseOnIdleStateHandler(Registry registry, String metricId) {
method userEventTriggered (line 32) | @Override
FILE: zuul-core/src/main/java/com/netflix/netty/common/ConnectionCloseChannelAttributes.java
class ConnectionCloseChannelAttributes (line 26) | public class ConnectionCloseChannelAttributes {
method gracefulCloseDelay (line 31) | public static int gracefulCloseDelay(Channel channel) {
method allowGracefulDelayed (line 38) | public static boolean allowGracefulDelayed(Channel channel) {
FILE: zuul-core/src/main/java/com/netflix/netty/common/ConnectionCloseType.java
type ConnectionCloseType (line 26) | public enum ConnectionCloseType {
method fromChannel (line 31) | public static ConnectionCloseType fromChannel(Channel ch) {
method setForChannel (line 41) | public static void setForChannel(Channel ch, ConnectionCloseType type) {
FILE: zuul-core/src/main/java/com/netflix/netty/common/Http1ConnectionCloseHandler.java
class Http1ConnectionCloseHandler (line 36) | public class Http1ConnectionCloseHandler extends ChannelDuplexHandler {
method write (line 41) | @Override
method userEventTriggered (line 66) | @Override
method closeChannel (line 78) | protected void closeChannel(ChannelHandlerContext ctx, ConnectionClose...
method gracefully (line 94) | protected void gracefully(ChannelHandlerContext ctx, ChannelPromise pr...
method immediately (line 137) | protected void immediately(ChannelHandlerContext ctx, ChannelPromise p...
FILE: zuul-core/src/main/java/com/netflix/netty/common/Http1ConnectionExpiryHandler.java
class Http1ConnectionExpiryHandler (line 26) | public class Http1ConnectionExpiryHandler extends AbstrHttpConnectionExp...
method Http1ConnectionExpiryHandler (line 27) | public Http1ConnectionExpiryHandler(int maxRequests, int maxRequestsUn...
method isResponseHeaders (line 31) | @Override
FILE: zuul-core/src/main/java/com/netflix/netty/common/Http2ConnectionCloseHandler.java
class Http2ConnectionCloseHandler (line 44) | @ChannelHandler.Sharable
method Http2ConnectionCloseHandler (line 51) | @Inject
method incrementCounter (line 58) | private void incrementCounter(ConnectionCloseType closeType, int port) {
method write (line 66) | @Override
method shouldCloseAfter (line 94) | private ChannelPromise shouldCloseAfter(ChannelHandlerContext ctx, Cha...
method isEndOfRequestResponse (line 105) | private boolean isEndOfRequestResponse(Object msg) {
method closeChannel (line 115) | private void closeChannel(ChannelHandlerContext ctx, ChannelPromise pr...
method gracefullyWithDelay (line 164) | private void gracefullyWithDelay(EventExecutor executor, Channel paren...
method immediate (line 223) | private void immediate(Channel parent, ChannelPromise promise) {
method isAlreadyClosing (line 231) | protected boolean isAlreadyClosing(Channel parentChannel) {
FILE: zuul-core/src/main/java/com/netflix/netty/common/Http2ConnectionExpiryHandler.java
class Http2ConnectionExpiryHandler (line 29) | @ChannelHandler.Sharable
method Http2ConnectionExpiryHandler (line 31) | public Http2ConnectionExpiryHandler(int maxRequests, int maxRequestsUn...
method isResponseHeaders (line 35) | @Override
FILE: zuul-core/src/main/java/com/netflix/netty/common/HttpChannelFlags.java
class HttpChannelFlags (line 29) | public class HttpChannelFlags {
class Flag (line 34) | public static class Flag {
method Flag (line 37) | public Flag(String name) {
method set (line 41) | public void set(Channel ch) {
method set (line 45) | public void set(ChannelHandlerContext ctx) {
method remove (line 49) | public void remove(Channel ch) {
method get (line 53) | public boolean get(Channel ch) {
method get (line 59) | public boolean get(ChannelHandlerContext ctx) {
FILE: zuul-core/src/main/java/com/netflix/netty/common/HttpClientLifecycleChannelHandler.java
class HttpClientLifecycleChannelHandler (line 31) | public class HttpClientLifecycleChannelHandler extends HttpLifecycleChan...
class HttpClientLifecycleInboundChannelHandler (line 35) | @ChannelHandler.Sharable
method channelRead (line 37) | @Override
method channelInactive (line 52) | @Override
class HttpClientLifecycleOutboundChannelHandler (line 62) | @ChannelHandler.Sharable
method write (line 64) | @Override
method disconnect (line 73) | @Override
method deregister (line 80) | @Override
method exceptionCaught (line 87) | @Override
method close (line 94) | @Override
FILE: zuul-core/src/main/java/com/netflix/netty/common/HttpLifecycleChannelHandler.java
class HttpLifecycleChannelHandler (line 36) | public abstract class HttpLifecycleChannelHandler {
type State (line 44) | protected enum State {
method fireStartEvent (line 52) | protected static boolean fireStartEvent(ChannelHandlerContext ctx, Htt...
method fireCompleteEventIfNotAlready (line 77) | protected static boolean fireCompleteEventIfNotAlready(ChannelHandlerC...
method addPassportState (line 101) | protected static void addPassportState(ChannelHandlerContext ctx, Pass...
type CompleteReason (line 106) | public enum CompleteReason {
class StartEvent (line 141) | public static class StartEvent {
method StartEvent (line 144) | public StartEvent(HttpRequest request) {
method getRequest (line 148) | public HttpRequest getRequest() {
class CompleteEvent (line 153) | public static class CompleteEvent {
method CompleteEvent (line 158) | public CompleteEvent(CompleteReason reason, HttpRequest request, Htt...
method getReason (line 164) | public CompleteReason getReason() {
method getRequest (line 168) | public HttpRequest getRequest() {
method getResponse (line 172) | public HttpResponse getResponse() {
FILE: zuul-core/src/main/java/com/netflix/netty/common/HttpRequestReadTimeoutEvent.java
class HttpRequestReadTimeoutEvent (line 24) | public class HttpRequestReadTimeoutEvent {
FILE: zuul-core/src/main/java/com/netflix/netty/common/HttpRequestReadTimeoutHandler.java
class HttpRequestReadTimeoutHandler (line 39) | public class HttpRequestReadTimeoutHandler extends ChannelInboundHandler...
method HttpRequestReadTimeoutHandler (line 47) | protected HttpRequestReadTimeoutHandler(long timeout, TimeUnit unit, C...
method addLast (line 57) | public static void addLast(
method channelRead (line 64) | @Override
method userEventTriggered (line 77) | @Override
method handlerRemoved (line 88) | @Override
method channelInactive (line 94) | @Override
method removeInternalHandler (line 100) | protected void removeInternalHandler(ChannelHandlerContext ctx) {
class InternalReadTimeoutHandler (line 108) | static class InternalReadTimeoutHandler extends ReadTimeoutHandler {
method InternalReadTimeoutHandler (line 109) | public InternalReadTimeoutHandler(long timeout, TimeUnit unit) {
method readTimedOut (line 113) | @Override
FILE: zuul-core/src/main/java/com/netflix/netty/common/HttpServerLifecycleChannelHandler.java
class HttpServerLifecycleChannelHandler (line 34) | public final class HttpServerLifecycleChannelHandler extends HttpLifecyc...
class HttpServerLifecycleInboundChannelHandler (line 35) | public static final class HttpServerLifecycleInboundChannelHandler ext...
method channelRead (line 36) | @Override
method channelInactive (line 51) | @Override
class HttpServerLifecycleOutboundChannelHandler (line 59) | public static final class HttpServerLifecycleOutboundChannelHandler ex...
method write (line 60) | @Override
method disconnect (line 96) | @Override
method close (line 103) | @Override
FILE: zuul-core/src/main/java/com/netflix/netty/common/RequestResponseCompleteEvent.java
class RequestResponseCompleteEvent (line 24) | public class RequestResponseCompleteEvent {}
FILE: zuul-core/src/main/java/com/netflix/netty/common/SourceAddressChannelHandler.java
class SourceAddressChannelHandler (line 39) | @ChannelHandler.Sharable
method channelActive (line 105) | @Override
method getHostAddress (line 128) | @VisibleForTesting
method sourceAddress (line 149) | private InetSocketAddress sourceAddress(Channel channel) {
method localAddress (line 160) | private InetSocketAddress localAddress(Channel channel) {
FILE: zuul-core/src/main/java/com/netflix/netty/common/SslExceptionsHandler.java
class SslExceptionsHandler (line 33) | @Sharable
method SslExceptionsHandler (line 39) | public SslExceptionsHandler(Registry registry) {
method exceptionCaught (line 43) | @Override
FILE: zuul-core/src/main/java/com/netflix/netty/common/SwallowSomeHttp2ExceptionsHandler.java
class SwallowSomeHttp2ExceptionsHandler (line 29) | @ChannelHandler.Sharable
method SwallowSomeHttp2ExceptionsHandler (line 35) | public SwallowSomeHttp2ExceptionsHandler(Registry registry) {
method exceptionCaught (line 39) | @Override
method incrementExceptionCounter (line 60) | private void incrementExceptionCounter(Throwable throwable) {
FILE: zuul-core/src/main/java/com/netflix/netty/common/accesslog/AccessLogChannelHandler.java
class AccessLogChannelHandler (line 39) | public final class AccessLogChannelHandler {
class AccessLogInboundChannelHandler (line 45) | public static class AccessLogInboundChannelHandler extends ChannelInbo...
method AccessLogInboundChannelHandler (line 48) | public AccessLogInboundChannelHandler(AccessLogPublisher publisher) {
method getLocalPort (line 52) | protected Integer getLocalPort(ChannelHandlerContext ctx) {
method getRemoteIp (line 58) | protected String getRemoteIp(ChannelHandlerContext ctx) {
method channelRead (line 64) | @Override
method userEventTriggered (line 84) | @Override
class AccessLogOutboundChannelHandler (line 122) | public static final class AccessLogOutboundChannelHandler extends Chan...
method write (line 123) | @Override
class RequestState (line 140) | private static class RequestState {
FILE: zuul-core/src/main/java/com/netflix/netty/common/accesslog/AccessLogPublisher.java
class AccessLogPublisher (line 33) | public class AccessLogPublisher {
method AccessLogPublisher (line 51) | public AccessLogPublisher(String loggerName, BiFunction<Channel, HttpR...
method log (line 56) | public void log(
method includeMatchingHeaders (line 129) | void includeMatchingHeaders(StringBuilder builder, List<String> requir...
method headerAsString (line 136) | String headerAsString(HttpHeaders headers, String headerName) {
FILE: zuul-core/src/main/java/com/netflix/netty/common/channel/config/ChannelConfig.java
class ChannelConfig (line 27) | public class ChannelConfig implements Cloneable {
method ChannelConfig (line 30) | public ChannelConfig() {
method ChannelConfig (line 34) | public ChannelConfig(Map<ChannelConfigKey, ChannelConfigValue> paramet...
method add (line 38) | public void add(ChannelConfigValue param) {
method set (line 42) | public <T> void set(ChannelConfigKey<T> key, T value) {
method get (line 46) | public <T> T get(ChannelConfigKey<T> key) {
method getConfig (line 57) | public <T> ChannelConfigValue<T> getConfig(ChannelConfigKey<T> key) {
method contains (line 61) | public <T> boolean contains(ChannelConfigKey<T> key) {
method clone (line 65) | @Override
FILE: zuul-core/src/main/java/com/netflix/netty/common/channel/config/ChannelConfigKey.java
class ChannelConfigKey (line 24) | public class ChannelConfigKey<T> {
method ChannelConfigKey (line 28) | public ChannelConfigKey(String key, T defaultValue) {
method ChannelConfigKey (line 33) | public ChannelConfigKey(String key) {
method key (line 38) | public String key() {
method defaultValue (line 42) | public T defaultValue() {
method hasDefaultValue (line 46) | public boolean hasDefaultValue() {
method toString (line 50) | @Override
FILE: zuul-core/src/main/java/com/netflix/netty/common/channel/config/ChannelConfigValue.java
class ChannelConfigValue (line 24) | public class ChannelConfigValue<T> {
method ChannelConfigValue (line 28) | public ChannelConfigValue(ChannelConfigKey<T> key, T value) {
method key (line 33) | public ChannelConfigKey<T> key() {
method value (line 37) | public T value() {
FILE: zuul-core/src/main/java/com/netflix/netty/common/channel/config/CommonChannelConfigKeys.java
class CommonChannelConfigKeys (line 31) | public class CommonChannelConfigKeys {
FILE: zuul-core/src/main/java/com/netflix/netty/common/http2/DynamicHttp2FrameLogger.java
class DynamicHttp2FrameLogger (line 36) | public class DynamicHttp2FrameLogger extends Http2FrameLogger {
method DynamicHttp2FrameLogger (line 46) | public DynamicHttp2FrameLogger(LogLevel level, Class<?> clazz) {
method enabled (line 52) | protected boolean enabled(ChannelHandlerContext ctx) {
method enabled (line 56) | protected boolean enabled() {
method logData (line 60) | @Override
method logHeaders (line 80) | @Override
method logHeaders (line 93) | @Override
method logPriority (line 119) | @Override
method logRstStream (line 140) | @Override
method logSettingsAck (line 147) | @Override
method logSettings (line 154) | @Override
method logPing (line 161) | @Override
method logPingAck (line 168) | @Override
method logPushPromise (line 175) | @Override
method logGoAway (line 196) | @Override
method logWindowsUpdate (line 212) | @Override
method logUnknownFrame (line 220) | @Override
method toString (line 242) | private String toString(ByteBuf buf) {
method log (line 253) | @FormatMethod
method shouldLogFrame (line 269) | protected boolean shouldLogFrame(String frame) {
FILE: zuul-core/src/main/java/com/netflix/netty/common/metrics/EventLoopGroupMetrics.java
class EventLoopGroupMetrics (line 30) | @Singleton
method EventLoopGroupMetrics (line 35) | @Inject
method connectionsPerEventLoop (line 46) | public Map<Thread, Integer> connectionsPerEventLoop() {
method httpRequestsPerEventLoop (line 54) | public Map<Thread, Integer> httpRequestsPerEventLoop() {
method getForCurrentEventLoop (line 62) | public EventLoopMetrics getForCurrentEventLoop() {
method nameForCurrentEventLoop (line 66) | private static String nameForCurrentEventLoop() {
type EventLoopInfo (line 76) | interface EventLoopInfo {
method currentConnectionsCount (line 77) | int currentConnectionsCount();
method currentHttpRequestsCount (line 79) | int currentHttpRequestsCount();
FILE: zuul-core/src/main/java/com/netflix/netty/common/metrics/EventLoopMetrics.java
class EventLoopMetrics (line 28) | public class EventLoopMetrics implements EventLoopGroupMetrics.EventLoop...
method EventLoopMetrics (line 37) | public EventLoopMetrics(Registry registry, String eventLoopName) {
method currentConnectionsCount (line 45) | @Override
method currentHttpRequestsCount (line 50) | @Override
method incrementCurrentRequests (line 55) | public void incrementCurrentRequests() {
method decrementCurrentRequests (line 60) | public void decrementCurrentRequests() {
method incrementCurrentConnections (line 65) | public void incrementCurrentConnections() {
method decrementCurrentConnections (line 70) | public void decrementCurrentConnections() {
method updateGauge (line 75) | private void updateGauge(Id gaugeId, int value) {
FILE: zuul-core/src/main/java/com/netflix/netty/common/metrics/Http2MetricsChannelHandlers.java
class Http2MetricsChannelHandlers (line 30) | public class Http2MetricsChannelHandlers {
method Http2MetricsChannelHandlers (line 34) | public Http2MetricsChannelHandlers(Registry registry, String metricPre...
method inbound (line 40) | public Inbound inbound() {
method outbound (line 44) | public Outbound outbound() {
method incrementErrorCounter (line 48) | protected void incrementErrorCounter(Registry registry, String counter...
method incrementCounter (line 56) | protected void incrementCounter(Registry registry, String counterName,...
class Inbound (line 70) | @ChannelHandler.Sharable
method Inbound (line 77) | public Inbound(Registry registry, String metricId, String metricPref...
method channelRead (line 84) | @Override
method userEventTriggered (line 95) | @Override
method exceptionCaught (line 106) | @Override
class Outbound (line 118) | @ChannelHandler.Sharable
method Outbound (line 125) | public Outbound(Registry registry, String metricId, String metricPre...
method write (line 132) | @Override
method exceptionCaught (line 141) | @Override
FILE: zuul-core/src/main/java/com/netflix/netty/common/metrics/HttpBodySizeRecordingChannelHandler.java
class HttpBodySizeRecordingChannelHandler (line 35) | public final class HttpBodySizeRecordingChannelHandler {
method getCurrentInboundBodySize (line 38) | public static Provider<Long> getCurrentInboundBodySize(Channel ch) {
method getCurrentOutboundBodySize (line 42) | public static Provider<Long> getCurrentOutboundBodySize(Channel ch) {
method getOrCreateCurrentState (line 46) | private static State getOrCreateCurrentState(Channel ch) {
method createNewState (line 54) | private static State createNewState(Channel ch) {
class InboundChannelHandler (line 60) | public static final class InboundChannelHandler extends ChannelInbound...
method channelRead (line 61) | @Override
method userEventTriggered (line 81) | @Override
class OutboundChannelHandler (line 93) | public static final class OutboundChannelHandler extends ChannelOutbou...
method write (line 94) | @Override
class State (line 115) | private static class State {
class InboundBodySizeProvider (line 120) | static class InboundBodySizeProvider implements Provider<Long> {
method InboundBodySizeProvider (line 123) | public InboundBodySizeProvider(Channel channel) {
method get (line 127) | @Override
class OutboundBodySizeProvider (line 134) | static class OutboundBodySizeProvider implements Provider<Long> {
method OutboundBodySizeProvider (line 137) | public OutboundBodySizeProvider(Channel channel) {
method get (line 141) | @Override
FILE: zuul-core/src/main/java/com/netflix/netty/common/metrics/HttpMetricsChannelHandler.java
class HttpMetricsChannelHandler (line 37) | @ChannelHandler.Sharable
method HttpMetricsChannelHandler (line 50) | public HttpMetricsChannelHandler(Registry registry, String name, Strin...
method getInflightRequestCountFromChannel (line 60) | public static int getInflightRequestCountFromChannel(Channel ch) {
method getInflightRequestsCount (line 65) | public int getInflightRequestsCount() {
method channelActive (line 69) | @Override
method userEventTriggered (line 78) | @Override
method incrementCurrentRequestsInFlight (line 91) | private void incrementCurrentRequestsInFlight(ChannelHandlerContext ct...
method decrementCurrentRequestsIfOneInflight (line 96) | private void decrementCurrentRequestsIfOneInflight(ChannelHandlerConte...
FILE: zuul-core/src/main/java/com/netflix/netty/common/metrics/InstrumentedResourceLeakDetector.java
class InstrumentedResourceLeakDetector (line 32) | public class InstrumentedResourceLeakDetector<T> extends ResourceLeakDet...
method InstrumentedResourceLeakDetector (line 37) | public InstrumentedResourceLeakDetector(Class<?> resourceType, int sam...
method InstrumentedResourceLeakDetector (line 44) | public InstrumentedResourceLeakDetector(Class<?> resourceType, int sam...
method reportTracedLeak (line 48) | @Override
method reportUntracedLeak (line 55) | @Override
method resetReportedLeaks (line 66) | private void resetReportedLeaks() {
FILE: zuul-core/src/main/java/com/netflix/netty/common/metrics/PerEventLoopMetricsChannelHandler.java
class PerEventLoopMetricsChannelHandler (line 30) | public class PerEventLoopMetricsChannelHandler {
method PerEventLoopMetricsChannelHandler (line 37) | public PerEventLoopMetricsChannelHandler(EventLoopGroupMetrics groupMe...
class Connections (line 41) | @ChannelHandler.Sharable
method channelActive (line 43) | @Override
method channelInactive (line 49) | @Override
class HttpRequests (line 59) | @ChannelHandler.Sharable
method userEventTriggered (line 61) | @Override
method incrementCurrentRequestsInFlight (line 72) | private void incrementCurrentRequestsInFlight(ChannelHandlerContext ...
method decrementCurrentRequestsIfOneInflight (line 77) | private void decrementCurrentRequestsIfOneInflight(ChannelHandlerCon...
FILE: zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandler.java
class ElbProxyProtocolChannelHandler (line 33) | public final class ElbProxyProtocolChannelHandler extends ChannelInbound...
method ElbProxyProtocolChannelHandler (line 39) | public ElbProxyProtocolChannelHandler(Registry registry, boolean withP...
method addProxyProtocol (line 44) | public void addProxyProtocol(ChannelPipeline pipeline) {
method channelRead (line 48) | @Override
method getDetectionState (line 82) | private ProtocolDetectionState getDetectionState(Object msg) {
FILE: zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandler.java
class HAProxyMessageChannelHandler (line 43) | public final class HAProxyMessageChannelHandler extends ChannelInboundHa...
method channelRead (line 61) | @Override
method parseSrcAddr (line 81) | private void parseSrcAddr(HAProxyMessage hapm, Channel channel) {
method parseDstAddr (line 116) | private void parseDstAddr(HAProxyMessage hapm, Channel channel) {
FILE: zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/StripUntrustedProxyHeadersHandler.java
class StripUntrustedProxyHeadersHandler (line 39) | @ChannelHandler.Sharable
type AllowWhen (line 44) | public enum AllowWhen {
method StripUntrustedProxyHeadersHandler (line 59) | public StripUntrustedProxyHeadersHandler(AllowWhen allowWhen) {
method channelRead (line 63) | @Override
method connectionIsUsingMutualSSLWithAuthEnforced (line 89) | @VisibleForTesting
method stripXFFHeaders (line 102) | @VisibleForTesting
method checkBlacklist (line 110) | @VisibleForTesting
FILE: zuul-core/src/main/java/com/netflix/netty/common/ssl/ServerSslConfig.java
class ServerSslConfig (line 36) | @Getter
method ServerSslConfig (line 76) | @Deprecated
method ServerSslConfig (line 84) | @Deprecated
method ServerSslConfig (line 93) | @Deprecated
method ServerSslConfig (line 118) | @Deprecated
method getDefaultCiphers (line 140) | public static List<String> getDefaultCiphers() {
method withDefaultCiphers (line 147) | @Deprecated
method toString (line 157) | @Override
FILE: zuul-core/src/main/java/com/netflix/netty/common/ssl/SslHandshakeInfo.java
class SslHandshakeInfo (line 31) | @Builder
method SslHandshakeInfo (line 49) | @Deprecated
method SslHandshakeInfo (line 63) | @Deprecated
method SslHandshakeInfo (line 87) | @Deprecated
method SslHandshakeInfo (line 112) | @Deprecated
method getRequestedSni (line 135) | public String getRequestedSni() {
method isOfIntermediary (line 139) | public boolean isOfIntermediary() {
method getProtocol (line 143) | public String getProtocol() {
method getCipherSuite (line 147) | public String getCipherSuite() {
method getNamedGroup (line 151) | public String getNamedGroup() {
method getClientAuthRequirement (line 155) | public ClientAuth getClientAuthRequirement() {
method getServerCertificate (line 159) | public Certificate getServerCertificate() {
method getClientCertificate (line 163) | public X509Certificate getClientCertificate() {
method usingExternalPSK (line 167) | public boolean usingExternalPSK() {
method geClientPSKIdentityInfo (line 171) | public ClientPSKIdentityInfo geClientPSKIdentityInfo() {
method toString (line 175) | @Override
FILE: zuul-core/src/main/java/com/netflix/netty/common/status/ServerStatusManager.java
class ServerStatusManager (line 29) | @Singleton
method ServerStatusManager (line 33) | @Inject
method localStatus (line 38) | public void localStatus(InstanceInfo.InstanceStatus status) {
FILE: zuul-core/src/main/java/com/netflix/netty/common/throttle/MaxInboundConnectionsHandler.java
class MaxInboundConnectionsHandler (line 40) | @ChannelHandler.Sharable
method MaxInboundConnectionsHandler (line 50) | public MaxInboundConnectionsHandler(Registry registry, String metricId...
method channelActive (line 55) | @Override
method channelRead (line 75) | @Override
method channelInactive (line 85) | @Override
FILE: zuul-core/src/main/java/com/netflix/netty/common/throttle/RejectionType.java
type RejectionType (line 23) | public enum RejectionType {
FILE: zuul-core/src/main/java/com/netflix/netty/common/throttle/RejectionUtils.java
class RejectionUtils (line 49) | public final class RejectionUtils {
method rejectByClosingConnection (line 64) | public static void rejectByClosingConnection(
method sendRejectionResponse (line 104) | public static void sendRejectionResponse(
method allowThenClose (line 142) | public static void allowThenClose(ChannelHandlerContext ctx) {
method handleRejection (line 166) | public static void handleRejection(
method reject (line 226) | public static void reject(
method reject (line 261) | public static void reject(
method notifyHandlers (line 293) | private static void notifyHandlers(
method closeConnectionAfterReject (line 304) | private static boolean closeConnectionAfterReject(Channel channel) {
method createRejectionResponse (line 314) | private static FullHttpResponse createRejectionResponse(
method RejectionUtils (line 332) | private RejectionUtils() {}
FILE: zuul-core/src/main/java/com/netflix/netty/common/throttle/RequestRejectedEvent.java
method RequestRejectedEvent (line 31) | public RequestRejectedEvent(
method getNfStatus (line 38) | public StatusCategory getNfStatus() {
method getHttpStatus (line 42) | public HttpResponseStatus getHttpStatus() {
method getReason (line 46) | public String getReason() {
FILE: zuul-core/src/main/java/com/netflix/zuul/Attrs.java
class Attrs (line 36) | public final class Attrs {
method newKey (line 40) | public static <T> Key<T> newKey(String keyName) {
class Key (line 44) | public static final class Key<T> {
method get (line 51) | @Nullable
method getOrDefault (line 62) | @SuppressWarnings("unchecked")
method put (line 73) | public void put(Attrs attrs, T value) {
method name (line 79) | public String name() {
method Key (line 83) | private Key(String name) {
method toString (line 87) | @Override
method Attrs (line 93) | private Attrs() {}
method newInstance (line 95) | public static Attrs newInstance() {
method keySet (line 99) | public Set<Key<?>> keySet() {
method forEach (line 103) | public void forEach(BiConsumer<? super Key<?>, Object> consumer) {
method size (line 107) | public int size() {
method toString (line 111) | @Override
method equals (line 116) | @Override
method hashCode (line 126) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/BasicFilterUsageNotifier.java
class BasicFilterUsageNotifier (line 26) | public class BasicFilterUsageNotifier implements FilterUsageNotifier {
method BasicFilterUsageNotifier (line 30) | @Inject
method notify (line 35) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/BasicRequestCompleteHandler.java
class BasicRequestCompleteHandler (line 31) | public class BasicRequestCompleteHandler implements RequestCompleteHandl...
method handle (line 36) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/DefaultFilterFactory.java
class DefaultFilterFactory (line 24) | public class DefaultFilterFactory implements FilterFactory {
method newInstance (line 33) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/DynamicFilterLoader.java
class DynamicFilterLoader (line 34) | @Singleton
method DynamicFilterLoader (line 46) | @Inject
method filterInstanceMapSize (line 55) | public int filterInstanceMapSize() {
method putFilter (line 59) | private void putFilter(String filterName, ZuulFilter<?, ?> filter, lon...
method putFiltersForClasses (line 84) | @Override
method putFilterForClassName (line 93) | @Override
method getFiltersByType (line 108) | @Override
method getFilterByNameAndType (line 127) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/ExecutionStatus.java
type ExecutionStatus (line 18) | public enum ExecutionStatus {
FILE: zuul-core/src/main/java/com/netflix/zuul/FilterCategory.java
type FilterCategory (line 22) | public enum FilterCategory {
method FilterCategory (line 42) | FilterCategory(String code, String description) {
method getCode (line 47) | public String getCode() {
method getDescription (line 51) | public String getDescription() {
method toString (line 55) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/FilterConstraint.java
type FilterConstraint (line 30) | public interface FilterConstraint {
method isConstrained (line 31) | boolean isConstrained(@NonNull ZuulMessage msg);
FILE: zuul-core/src/main/java/com/netflix/zuul/FilterFactory.java
type FilterFactory (line 23) | public interface FilterFactory {
method newInstance (line 32) | ZuulFilter<?, ?> newInstance(Class<?> clazz) throws Exception;
FILE: zuul-core/src/main/java/com/netflix/zuul/FilterFileManager.java
class FilterFileManager (line 30) | @Singleton
method FilterFileManager (line 38) | @Inject
method init (line 44) | @Inject
class FilterFileManagerConfig (line 55) | public static class FilterFileManagerConfig {
method FilterFileManagerConfig (line 59) | public FilterFileManagerConfig(String[] classNames) {
method FilterFileManagerConfig (line 63) | public FilterFileManagerConfig(String[] classNames, boolean enabled) {
method getClassNames (line 68) | public String[] getClassNames() {
FILE: zuul-core/src/main/java/com/netflix/zuul/FilterLoader.java
type FilterLoader (line 29) | public interface FilterLoader {
method putFiltersForClasses (line 39) | List<ZuulFilter<?, ?>> putFiltersForClasses(String[] classNames) throw...
method putFilterForClassName (line 41) | ZuulFilter<?, ?> putFilterForClassName(String className) throws Except...
method getFiltersByType (line 46) | SortedSet<ZuulFilter<?, ?>> getFiltersByType(FilterType filterType);
method getFilterByNameAndType (line 48) | ZuulFilter<?, ?> getFilterByNameAndType(String name, FilterType type);
FILE: zuul-core/src/main/java/com/netflix/zuul/FilterUsageNotifier.java
type FilterUsageNotifier (line 28) | public interface FilterUsageNotifier {
method notify (line 29) | void notify(ZuulFilter<?, ?> filter, ExecutionStatus status);
FILE: zuul-core/src/main/java/com/netflix/zuul/RequestCompleteHandler.java
type RequestCompleteHandler (line 21) | public interface RequestCompleteHandler {
method handle (line 22) | void handle(HttpRequestInfo inboundRequest, HttpResponseMessage respon...
FILE: zuul-core/src/main/java/com/netflix/zuul/StaticFilterLoader.java
class StaticFilterLoader (line 46) | public final class StaticFilterLoader implements FilterLoader {
method StaticFilterLoader (line 55) | @Inject
method loadFilterTypesFromResources (line 86) | public static Set<Class<ZuulFilter<?, ?>>> loadFilterTypesFromResource...
method putFiltersForClasses (line 123) | @Override
method putFilterForClassName (line 129) | @Override
method getFiltersByType (line 135) | @Override
method getFilterByNameAndType (line 140) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/ZuulApplicationInfo.java
class ZuulApplicationInfo (line 24) | public class ZuulApplicationInfo {
method getApplicationName (line 28) | public static String getApplicationName() {
method setApplicationName (line 32) | public static void setApplicationName(String applicationName) {
method getStack (line 36) | public static String getStack() {
method setStack (line 40) | public static void setStack(String stack) {
FILE: zuul-core/src/main/java/com/netflix/zuul/constants/ZuulConstants.java
class ZuulConstants (line 23) | public class ZuulConstants {
method ZuulConstants (line 72) | private ZuulConstants() {
FILE: zuul-core/src/main/java/com/netflix/zuul/constants/ZuulHeaders.java
class ZuulHeaders (line 24) | public class ZuulHeaders {
method ZuulHeaders (line 51) | private ZuulHeaders() {
FILE: zuul-core/src/main/java/com/netflix/zuul/context/CommonContextKeys.java
class CommonContextKeys (line 38) | public class CommonContextKeys {
FILE: zuul-core/src/main/java/com/netflix/zuul/context/Debug.java
class Debug (line 35) | public class Debug {
method setDebugRequest (line 37) | public static void setDebugRequest(SessionContext ctx, boolean bDebug) {
method setDebugRequestHeadersOnly (line 41) | public static void setDebugRequestHeadersOnly(SessionContext ctx, bool...
method debugRequestHeadersOnly (line 45) | public static boolean debugRequestHeadersOnly(SessionContext ctx) {
method setDebugRouting (line 49) | public static void setDebugRouting(SessionContext ctx, boolean bDebug) {
method debugRequest (line 53) | public static boolean debugRequest(SessionContext ctx) {
method debugRouting (line 57) | public static boolean debugRouting(SessionContext ctx) {
method addRoutingDebug (line 61) | public static void addRoutingDebug(SessionContext ctx, String line) {
method addRequestDebugForMessage (line 66) | public static void addRequestDebugForMessage(SessionContext ctx, ZuulM...
method getRoutingDebug (line 81) | public static List<String> getRoutingDebug(SessionContext ctx) {
method addRequestDebug (line 94) | public static void addRequestDebug(SessionContext ctx, String line) {
method getRequestDebug (line 103) | public static List<String> getRequestDebug(SessionContext ctx) {
method compareContextState (line 117) | public static void compareContextState(String filterName, SessionConte...
method writeDebugRequest (line 148) | public static Observable<Boolean> writeDebugRequest(
method writeDebugResponse (line 174) | public static Observable<Boolean> writeDebugResponse(
method writeDebugMessage (line 192) | public static Observable<Boolean> writeDebugMessage(
FILE: zuul-core/src/main/java/com/netflix/zuul/context/SessionCleaner.java
type SessionCleaner (line 26) | public interface SessionCleaner {
method cleanup (line 27) | Observable<Void> cleanup(SessionContext context);
FILE: zuul-core/src/main/java/com/netflix/zuul/context/SessionContext.java
class SessionContext (line 46) | public final class SessionContext extends HashMap<String, Object> implem...
class Key (line 79) | public static final class Key<T> {
method Key (line 84) | private Key(String name, Supplier<T> defaultValueSupplier) {
method toString (line 89) | @Override
method name (line 94) | public String name() {
method equals (line 101) | @Override
method hashCode (line 109) | @Override
method defaultValue (line 114) | public T defaultValue() {
method SessionContext (line 119) | @SuppressWarnings("UnnecessaryStringBuilder")
method newKey (line 130) | public static <T> Key<T> newKey(String name) {
method newKey (line 134) | public static <T> Key<T> newKey(String name, Supplier<T> defaultValueS...
method get (line 143) | @Override
method get (line 151) | @SuppressWarnings("unchecked")
method getOrDefault (line 166) | @NonNull
method getOrDefault (line 174) | @SuppressWarnings("unchecked")
method containsKey (line 190) | @Override
method containsKey (line 198) | public <T> boolean containsKey(Key<T> key) {
method put (line 207) | @Override
method put (line 216) | @Nullable
method remove (line 232) | @Override
method remove (line 237) | public <T> boolean remove(Key<T> key, T value) {
method remove (line 250) | @Override
method remove (line 255) | public <T> T remove(Key<T> key) {
method keys (line 262) | public Set<Key<?>> keys() {
method clone (line 269) | @Override
method getString (line 275) | public String getString(String key) {
method getBoolean (line 284) | public boolean getBoolean(String key) {
method getBoolean (line 293) | public boolean getBoolean(String key, boolean defaultResponse) {
method set (line 304) | public void set(String key) {
method set (line 312) | public void set(String key, Object value) {
method getUUID (line 320) | public String getUUID() {
method setUUID (line 324) | public void setUUID(String uuid) {
method setStaticResponse (line 328) | public void setStaticResponse(HttpResponseMessage response) {
method getStaticResponse (line 332) | public HttpResponseMessage getStaticResponse() {
method getError (line 340) | public Throwable getError() {
method setError (line 347) | public void setError(Throwable th) {
method getErrorEndpoint (line 351) | public String getErrorEndpoint() {
method setErrorEndpoint (line 355) | public void setErrorEndpoint(String name) {
method setDebugRouting (line 362) | public void setDebugRouting(boolean bDebug) {
method debugRouting (line 369) | public boolean debugRouting() {
method setDebugRequestHeadersOnly (line 377) | public void setDebugRequestHeadersOnly(boolean bHeadersOnly) {
method debugRequestHeadersOnly (line 384) | public boolean debugRequestHeadersOnly() {
method setDebugRequest (line 391) | public void setDebugRequest(boolean bDebug) {
method debugRequest (line 400) | public boolean debugRequest() {
method removeRouteHost (line 407) | public void removeRouteHost() {
method setRouteHost (line 416) | public void setRouteHost(URL routeHost) {
method getRouteHost (line 423) | public URL getRouteHost() {
method addFilterExecutionSummary (line 431) | public void addFilterExecutionSummary(String name, String status, long...
method getFilterExecutionSummary (line 448) | public StringBuilder getFilterExecutionSummary() {
method shouldSendErrorResponse (line 452) | public boolean shouldSendErrorResponse() {
method setShouldSendErrorResponse (line 461) | public void setShouldSendErrorResponse(boolean should) {
method errorResponseSent (line 465) | public boolean errorResponseSent() {
method setErrorResponseSent (line 469) | public void setErrorResponseSent(boolean should) {
method isInBrownoutMode (line 478) | public boolean isInBrownoutMode() {
method setInBrownoutMode (line 486) | @Deprecated
method setInBrownoutMode (line 491) | public void setInBrownoutMode(@NonNull String reason) {
method getBrownoutReason (line 496) | public @Nullable String getBrownoutReason() {
method stopFilterProcessing (line 504) | public void stopFilterProcessing() {
method shouldStopFilterProcessing (line 508) | public boolean shouldStopFilterProcessing() {
method getRouteVIP (line 516) | public String getRouteVIP() {
method setRouteVIP (line 523) | public void setRouteVIP(String sVip) {
method setEndpoint (line 527) | public void setEndpoint(String endpoint) {
method getEndpoint (line 531) | public String getEndpoint() {
method setEventProperty (line 535) | public void setEventProperty(String key, Object value) {
method getEventProperties (line 539) | public Map<String, Object> getEventProperties() {
method getFilterErrors (line 543) | public List<FilterError> getFilterErrors() {
method setOriginReportedDuration (line 547) | public void setOriginReportedDuration(int duration) {
method getOriginReportedDuration (line 551) | public int getOriginReportedDuration() {
method isCancelled (line 559) | public boolean isCancelled() {
method cancel (line 563) | public void cancel() {
FILE: zuul-core/src/main/java/com/netflix/zuul/context/SessionContextDecorator.java
type SessionContextDecorator (line 23) | public interface SessionContextDecorator {
method decorate (line 24) | public SessionContext decorate(SessionContext ctx);
FILE: zuul-core/src/main/java/com/netflix/zuul/context/SessionContextFactory.java
type SessionContextFactory (line 21) | public interface SessionContextFactory<T, V> {
method create (line 22) | public ZuulMessage create(SessionContext context, T nativeRequest, V n...
method write (line 24) | public Observable<ZuulMessage> write(ZuulMessage msg, V nativeResponse);
FILE: zuul-core/src/main/java/com/netflix/zuul/context/ZuulSessionContextDecorator.java
class ZuulSessionContextDecorator (line 36) | @Singleton
method ZuulSessionContextDecorator (line 43) | @Inject
method decorate (line 48) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/exception/ErrorType.java
type ErrorType (line 29) | public interface ErrorType {
method getStatusCodeToReturn (line 49) | int getStatusCodeToReturn();
method getStatusCategory (line 51) | StatusCategory getStatusCategory();
method getClientErrorType (line 53) | ClientException.ErrorType getClientErrorType();
FILE: zuul-core/src/main/java/com/netflix/zuul/exception/OutboundErrorType.java
type OutboundErrorType (line 29) | public enum OutboundErrorType implements ErrorType {
method OutboundErrorType (line 77) | OutboundErrorType(
method getStatusCodeToReturn (line 84) | @Override
method getStatusCategory (line 89) | @Override
method getClientErrorType (line 94) | @Override
method toString (line 99) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/exception/OutboundException.java
class OutboundException (line 29) | public class OutboundException extends ZuulException {
method OutboundException (line 33) | public OutboundException(ErrorType outboundErrorType, RequestAttempts ...
method OutboundException (line 41) | public OutboundException(ErrorType outboundErrorType, RequestAttempts ...
method getFinalRequestAttempt (line 49) | public RequestAttempt getFinalRequestAttempt() {
method getOutboundErrorType (line 53) | public ErrorType getOutboundErrorType() {
FILE: zuul-core/src/main/java/com/netflix/zuul/exception/RequestExpiredException.java
class RequestExpiredException (line 23) | public class RequestExpiredException extends ZuulException {
method RequestExpiredException (line 25) | public RequestExpiredException(String message) {
FILE: zuul-core/src/main/java/com/netflix/zuul/exception/ZuulException.java
class ZuulException (line 24) | public class ZuulException extends RuntimeException {
method ZuulException (line 35) | public ZuulException(String sMessage, Throwable throwable, String erro...
method ZuulException (line 45) | public ZuulException(String sMessage, String errorCause) {
method ZuulException (line 49) | public ZuulException(String sMessage, String errorCause, boolean noSta...
method ZuulException (line 54) | public ZuulException(Throwable throwable, String sMessage, boolean noS...
method ZuulException (line 59) | public ZuulException(Throwable throwable) {
method ZuulException (line 64) | public ZuulException(String sMessage) {
method ZuulException (line 68) | public ZuulException(String sMessage, boolean noStackTrace) {
method getStatusCode (line 73) | public int getStatusCode() {
method setStatusCode (line 77) | public void setStatusCode(int statusCode) {
method dontLogAsError (line 81) | public void dontLogAsError() {
method shouldLogAsError (line 85) | public boolean shouldLogAsError() {
method getErrorCause (line 89) | public String getErrorCause() {
FILE: zuul-core/src/main/java/com/netflix/zuul/exception/ZuulFilterConcurrencyExceededException.java
class ZuulFilterConcurrencyExceededException (line 20) | public class ZuulFilterConcurrencyExceededException extends ZuulException {
method ZuulFilterConcurrencyExceededException (line 22) | public ZuulFilterConcurrencyExceededException(ZuulFilter filter, int c...
FILE: zuul-core/src/main/java/com/netflix/zuul/filters/BaseFilter.java
class BaseFilter (line 43) | public abstract class BaseFilter<I extends ZuulMessage, O extends ZuulMe...
method BaseFilter (line 54) | protected BaseFilter() {
method filterName (line 67) | @Override
method overrideStopFilterProcessing (line 72) | @Override
method disablePropertyName (line 80) | public String disablePropertyName() {
method maxConcurrencyPropertyName (line 88) | public String maxConcurrencyPropertyName() {
method isDisabled (line 95) | @Override
method getDefaultOutput (line 100) | @Override
method getSyncType (line 105) | @Override
method toString (line 110) | @Override
method needsBodyBuffered (line 115) | @Override
method processContentChunk (line 120) | @Override
method incrementConcurrency (line 125) | @Override
method calculateConcurency (line 135) | protected int calculateConcurency() {
method decrementConcurrency (line 140) | @Override
method getConcurrency (line 145) | public int getConcurrency() {
FILE: zuul-core/src/main/java/com/netflix/zuul/filters/BaseSyncFilter.java
class BaseSyncFilter (line 26) | public abstract class BaseSyncFilter<I extends ZuulMessage, O extends Zu...
method applyAsync (line 34) | @Override
method getSyncType (line 39) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/filters/Endpoint.java
class Endpoint (line 26) | public abstract class Endpoint<I extends ZuulMessage, O extends ZuulMess...
method filterOrder (line 27) | @Override
method filterType (line 33) | @Override
method shouldFilter (line 38) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/filters/FilterError.java
class FilterError (line 23) | public class FilterError implements Cloneable {
method FilterError (line 28) | public FilterError(String filterName, String filterType, Throwable exc...
method getFilterName (line 34) | public String getFilterName() {
method getFilterType (line 38) | public String getFilterType() {
method getException (line 42) | public Throwable getException() {
method clone (line 46) | @Override
method toString (line 51) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/filters/FilterRegistry.java
type FilterRegistry (line 21) | public interface FilterRegistry {
method get (line 22) | @Nullable
method size (line 25) | int size();
method getAllFilters (line 27) | Collection<ZuulFilter<?, ?>> getAllFilters();
method isMutable (line 33) | boolean isMutable();
method remove (line 41) | @Nullable
method put (line 50) | void put(String key, ZuulFilter<?, ?> filter);
FILE: zuul-core/src/main/java/com/netflix/zuul/filters/FilterSyncType.java
type FilterSyncType (line 24) | public enum FilterSyncType {
FILE: zuul-core/src/main/java/com/netflix/zuul/filters/FilterType.java
type FilterType (line 26) | public enum FilterType {
method FilterType (line 33) | private FilterType(String shortName) {
method toString (line 37) | @Override
method parse (line 42) | public static FilterType parse(String str) {
FILE: zuul-core/src/main/java/com/netflix/zuul/filters/MutableFilterRegistry.java
class MutableFilterRegistry (line 26) | @Singleton
method remove (line 30) | @Nullable
method get (line 36) | @Override
method put (line 42) | @Override
method size (line 47) | @Override
method getAllFilters (line 52) | @Override
method isMutable (line 57) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/filters/ShouldFilter.java
type ShouldFilter (line 25) | public interface ShouldFilter<T extends ZuulMessage> {
method shouldFilter (line 31) | boolean shouldFilter(T msg);
FILE: zuul-core/src/main/java/com/netflix/zuul/filters/SyncZuulFilter.java
type SyncZuulFilter (line 26) | public interface SyncZuulFilter<I extends ZuulMessage, O extends ZuulMes...
method apply (line 27) | O apply(I input);
FILE: zuul-core/src/main/java/com/netflix/zuul/filters/SyncZuulFilterAdapter.java
class SyncZuulFilterAdapter (line 38) | public abstract class SyncZuulFilterAdapter<I extends ZuulMessage, O ext...
method isDisabled (line 41) | @Override
method shouldFilter (line 46) | @Override
method filterOrder (line 51) | @Override
method filterType (line 57) | @Override
method overrideStopFilterProcessing (line 62) | @Override
method applyAsync (line 67) | @Override
method getSyncType (line 72) | @Override
method needsBodyBuffered (line 77) | @Override
method processContentChunk (line 82) | @Override
method incrementConcurrency (line 87) | @Override
method decrementConcurrency (line 92) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/filters/ZuulFilter.java
type ZuulFilter (line 33) | public interface ZuulFilter<I extends ZuulMessage, O extends ZuulMessage...
method isDisabled (line 34) | boolean isDisabled();
method filterName (line 36) | String filterName();
method filterOrder (line 44) | default int filterOrder() {
method filterType (line 58) | default FilterType filterType() {
method category (line 71) | default FilterCategory category() {
method constraints (line 80) | default Class<? extends FilterConstraint>[] constraints() {
method overrideStopFilterProcessing (line 95) | boolean overrideStopFilterProcessing();
method incrementConcurrency (line 102) | void incrementConcurrency() throws ZuulFilterConcurrencyExceededExcept...
method applyAsync (line 107) | Observable<O> applyAsync(I input);
method decrementConcurrency (line 113) | void decrementConcurrency();
method getSyncType (line 115) | default FilterSyncType getSyncType() {
method getDefaultOutput (line 128) | O getDefaultOutput(I input);
method needsBodyBuffered (line 136) | boolean needsBodyBuffered(I input);
method processContentChunk (line 141) | HttpContent processContentChunk(ZuulMessage zuulMessage, HttpContent c...
FILE: zuul-core/src/main/java/com/netflix/zuul/filters/common/GZipResponseFilter.java
class GZipResponseFilter (line 48) | @Filter(order = 110, type = FilterType.OUTBOUND)
method shouldFilter (line 65) | @Override
method getGzipper (line 98) | protected Gzipper getGzipper() {
method isRightSizeForGzip (line 102) | @VisibleForTesting
method apply (line 109) | @Override
method isGzippableContentType (line 118) | private boolean isGzippableContentType(HttpResponseMessage response) {
method processContentChunk (line 130) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/filters/common/SurgicalDebugFilter.java
class SurgicalDebugFilter (line 38) | @Filter(order = 99, type = FilterType.INBOUND)
method patternMatches (line 48) | protected boolean patternMatches(HttpRequestMessage request) {
method filterOrder (line 52) | @Override
method shouldFilter (line 57) | @Override
method apply (line 78) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/EndpointLifecycle.java
type EndpointLifecycle (line 30) | public interface EndpointLifecycle {
method finish (line 38) | void finish(boolean error);
FILE: zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/MissingEndpointHandlingFilter.java
class MissingEndpointHandlingFilter (line 33) | @Filter(order = 0, type = FilterType.ENDPOINT)
method MissingEndpointHandlingFilter (line 40) | public MissingEndpointHandlingFilter(String name) {
method apply (line 44) | @Override
method filterName (line 54) | @Override
method getDefaultOutput (line 59) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java
class ProxyEndpoint (line 113) | @Filter(order = 0, type = FilterType.ENDPOINT)
method ProxyEndpoint (line 171) | public ProxyEndpoint(
method ProxyEndpoint (line 179) | public ProxyEndpoint(
method getAttemptNum (line 201) | public int getAttemptNum() {
method getRequestAttempts (line 205) | public RequestAttempts getRequestAttempts() {
method getCurrentRequestAttempt (line 209) | protected RequestAttempt getCurrentRequestAttempt() {
method getPassport (line 213) | public CurrentPassport getPassport() {
method getOrigin (line 217) | public NettyOrigin getOrigin() {
method getOrigin (line 227) | @Nullable
method getZuulRequest (line 275) | public HttpRequestMessage getZuulRequest() {
method unlinkFromOrigin (line 280) | private Channel unlinkFromOrigin() {
method releasePartialResponse (line 299) | private void releasePartialResponse(HttpResponse partialResponse) {
method finish (line 305) | @Override
method filterName (line 339) | @Override
method apply (line 344) | @Override
method processContentChunk (line 366) | @Override
method getDefaultOutput (line 388) | @Override
method invokeNext (line 393) | public void invokeNext(HttpResponseMessage zuulResponse) {
method invokeNext (line 403) | public void invokeNext(HttpContent chunk) {
method filterResponse (line 415) | private void filterResponse(HttpResponseMessage zuulResponse) {
method filterResponseChunk (line 423) | private void filterResponseChunk(HttpContent chunk) {
method storeAndLogOriginRequestInfo (line 445) | private void storeAndLogOriginRequestInfo() {
method updateOriginRpsTrackers (line 480) | protected void updateOriginRpsTrackers(NettyOrigin origin, int attempt) {
method proxyRequestToOrigin (line 484) | private void proxyRequestToOrigin() {
method createRequestStat (line 536) | protected RequestStat createRequestStat() {
method operationComplete (line 543) | @Override
method onOriginConnectSucceeded (line 581) | private void onOriginConnectSucceeded(PooledConnection conn, Duration ...
method onOriginConnectFailed (line 599) | private void onOriginConnectFailed(Throwable cause) {
method writeClientRequestToOrigin (line 606) | private void writeClientRequestToOrigin(PooledConnection conn, Duratio...
method syncClientAndOriginChannels (line 637) | protected void syncClientAndOriginChannels(Channel clientChannel, Chan...
method getOriginResponseReceiver (line 641) | protected OriginResponseReceiver getOriginResponseReceiver() {
method preWriteToOrigin (line 645) | protected void preWriteToOrigin(DiscoveryResult chosenServer, HttpRequ...
method writeBufferedBodyContent (line 649) | private static void writeBufferedBodyContent(HttpRequestMessage zuulRe...
method isRemoteZuulRetriesBelowRetryLimit (line 655) | protected boolean isRemoteZuulRetriesBelowRetryLimit(int maxAllowedRet...
method isBelowRetryLimit (line 660) | protected boolean isBelowRetryLimit() {
method errorFromOrigin (line 665) | public void errorFromOrigin(Throwable ex) {
method processErrorFromOrigin (line 688) | private void processErrorFromOrigin(Throwable ex, Channel origCh) {
method postErrorProcessing (line 765) | protected void postErrorProcessing(
method handleError (line 770) | private void handleError(Throwable cause) {
method handleNoOriginSelected (line 790) | private void handleNoOriginSelected() {
method isRetryable (line 798) | protected boolean isRetryable(ErrorType err) {
method isRequestReplayable (line 814) | protected boolean isRequestReplayable() {
method responseFromOrigin (line 826) | public void responseFromOrigin(HttpResponse originResponse) {
method processResponseFromOrigin (line 840) | private void processResponseFromOrigin(HttpResponse originResponse) {
method handleOriginSuccessResponse (line 848) | protected void handleOriginSuccessResponse(HttpResponse originResponse...
method buildZuulHttpResponse (line 870) | private HttpResponseMessage buildZuulHttpResponse(
method transformResponse (line 920) | private HttpResponseMessage transformResponse(HttpResponseMessage resp) {
method handleOriginNonSuccessResponse (line 925) | protected void handleOriginNonSuccessResponse(HttpResponse originRespo...
method isRetryable5xxResponse (line 1008) | public boolean isRetryable5xxResponse(
method originIndicatesRetryableInternalServerError (line 1024) | protected boolean originIndicatesRetryableInternalServerError(HttpResp...
method transformRequest (line 1031) | protected HttpRequestMessage transformRequest(HttpRequestMessage reque...
method addCustomRequestHeaders (line 1045) | protected void addCustomRequestHeaders(Headers headers) {
method massageRequestURI (line 1049) | @VisibleForTesting
method getOriginName (line 1086) | @Nonnull
method getClientName (line 1092) | @Nonnull
method injectCustomOriginName (line 1109) | @Nullable
method getOrCreateOrigin (line 1115) | private NettyOrigin getOrCreateOrigin(
method verifyOrigin (line 1130) | private void verifyOrigin(SessionContext context, HttpRequestMessage r...
method originNotFound (line 1147) | @ForOverride
method getTimeoutManager (line 1152) | @ForOverride
FILE: zuul-core/src/main/java/com/netflix/zuul/filters/http/HttpInboundFilter.java
class HttpInboundFilter (line 27) | public abstract class HttpInboundFilter extends BaseFilter<HttpRequestMe...
method filterType (line 28) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/filters/http/HttpInboundSyncFilter.java
class HttpInboundSyncFilter (line 27) | public abstract class HttpInboundSyncFilter extends BaseSyncFilter<HttpR...
method filterType (line 28) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/filters/http/HttpOutboundFilter.java
class HttpOutboundFilter (line 27) | public abstract class HttpOutboundFilter extends BaseFilter<HttpResponse...
method filterType (line 28) | @Override
method getDefaultOutput (line 33) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/filters/http/HttpOutboundSyncFilter.java
class HttpOutboundSyncFilter (line 27) | public abstract class HttpOutboundSyncFilter extends BaseSyncFilter<Http...
method filterType (line 28) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/filters/http/HttpSyncEndpoint.java
class HttpSyncEndpoint (line 36) | public abstract class HttpSyncEndpoint extends Endpoint<HttpRequestMessa...
method getDefaultOutput (line 44) | @Override
method applyAsync (line 49) | @Override
method processContentChunk (line 66) | @Override
method incrementConcurrency (line 80) | @Override
method decrementConcurrency (line 85) | @Override
class ResponseState (line 90) | private static class ResponseState {
method ResponseState (line 94) | public ResponseState(ZuulMessage response, Subscriber subscriber) {
FILE: zuul-core/src/main/java/com/netflix/zuul/filters/passport/InboundPassportStampingFilter.java
class InboundPassportStampingFilter (line 27) | @Filter(order = 0, type = FilterType.INBOUND)
method InboundPassportStampingFilter (line 30) | public InboundPassportStampingFilter(PassportState stamp) {
method filterType (line 34) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/filters/passport/OutboundPassportStampingFilter.java
class OutboundPassportStampingFilter (line 27) | @Filter(order = 0, type = FilterType.OUTBOUND)
method OutboundPassportStampingFilter (line 30) | public OutboundPassportStampingFilter(PassportState stamp) {
method filterType (line 34) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/filters/passport/PassportStampingFilter.java
class PassportStampingFilter (line 27) | public abstract class PassportStampingFilter<T extends ZuulMessage> exte...
method PassportStampingFilter (line 32) | public PassportStampingFilter(PassportState stamp) {
method filterName (line 37) | @Override
method getDefaultOutput (line 42) | @Override
method apply (line 47) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/logging/Http2FrameLoggingPerClientIpHandler.java
class Http2FrameLoggingPerClientIpHandler (line 29) | public class Http2FrameLoggingPerClientIpHandler extends ChannelInboundH...
method channelRead (line 33) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/message/Header.java
class Header (line 22) | public final class Header {
method Header (line 26) | public Header(HeaderName name, String value) {
method getKey (line 34) | public String getKey() {
method getName (line 38) | public HeaderName getName() {
method getValue (line 42) | public String getValue() {
method equals (line 46) | @Override
method hashCode (line 63) | @Override
method toString (line 70) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/message/HeaderName.java
class HeaderName (line 28) | public final class HeaderName {
method HeaderName (line 33) | public HeaderName(String name) {
method HeaderName (line 42) | HeaderName(String name, String normalised) {
method getName (line 51) | public String getName() {
method getNormalised (line 55) | public String getNormalised() {
method normalize (line 59) | static String normalize(String s) {
method equals (line 63) | @Override
method hashCode (line 75) | @Override
method toString (line 80) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/message/Headers.java
class Headers (line 43) | public final class Headers {
method copyOf (line 53) | public static Headers copyOf(Headers original) {
method Headers (line 57) | public Headers() {
method Headers (line 63) | public Headers(int initialSize) {
method Headers (line 69) | private Headers(Headers original) {
method getFirst (line 79) | @Nullable
method getFirst (line 89) | @Nullable
method getFirst (line 99) | public String getFirst(String headerName, String defaultValue) {
method getFirst (line 112) | public String getFirst(HeaderName headerName, String defaultValue) {
method getFirstNormal (line 121) | @Nullable
method getAll (line 134) | public List<String> getAll(String headerName) {
method getAll (line 142) | public List<String> getAll(HeaderName headerName) {
method getAllNormal (line 147) | private List<String> getAllNormal(String normalName) {
method forEachNormalised (line 169) | public void forEachNormalised(BiConsumer<? super String, ? super Strin...
method set (line 180) | public void set(String headerName, @Nullable String value) {
method set (line 190) | public void set(HeaderName headerName, String value) {
method setAndValidate (line 202) | public void setAndValidate(String headerName, @Nullable String value) {
method setAndValidate (line 214) | public void setAndValidate(HeaderName headerName, String value) {
method setIfValid (line 224) | public void setIfValid(HeaderName headerName, String value) {
method setIfValid (line 237) | public void setIfValid(String headerName, @Nullable String value) {
method setNormal (line 245) | private void setNormal(String originalName, String normalName, @Nullab...
method findNormal (line 264) | private int findNormal(String normalName) {
method clearMatchingStartingAt (line 276) | private void clearMatchingStartingAt(int i, String normalName, @Nullab...
method setIfAbsent (line 300) | public boolean setIfAbsent(String headerName, String value) {
method setIfAbsent (line 312) | public boolean setIfAbsent(HeaderName headerName, String value) {
method setIfAbsentNormal (line 318) | private boolean setIfAbsentNormal(String originalName, String normalNa...
method setIfAbsentAndValid (line 333) | public boolean setIfAbsentAndValid(String headerName, String value) {
method setIfAbsentAndValid (line 349) | public boolean setIfAbsentAndValid(HeaderName headerName, String value) {
method add (line 362) | public void add(String headerName, String value) {
method add (line 371) | public void add(HeaderName headerName, String value) {
method addAndValidate (line 382) | public void addAndValidate(String headerName, String value) {
method addAndValidate (line 393) | public void addAndValidate(HeaderName headerName, String value) {
method addIfValid (line 402) | public void addIfValid(String headerName, String value) {
method addIfValid (line 414) | public void addIfValid(HeaderName headerName, String value) {
method putAll (line 426) | public void putAll(Headers headers) {
method remove (line 435) | public List<String> remove(String headerName) {
method remove (line 443) | public List<String> remove(HeaderName headerName) {
method removeNormal (line 448) | private List<String> removeNormal(String normalName) {
method removeIf (line 460) | public boolean removeIf(Predicate<? super Map.Entry<HeaderName, String...
method entries (line 481) | public Collection<Header> entries() {
method keySet (line 493) | public Set<HeaderName> keySet() {
method contains (line 509) | public boolean contains(String headerName) {
method contains (line 517) | public boolean contains(HeaderName headerName) {
method contains (line 525) | public boolean contains(String headerName, String value) {
method contains (line 534) | public boolean contains(HeaderName headerName, String value) {
method containsNormal (line 540) | private boolean containsNormal(String normalName, String value) {
method size (line 552) | public int size() {
method hashCode (line 559) | @Override
method equals (line 570) | @Override
method asMap (line 584) | private Map<String, List<String>> asMap() {
method toString (line 596) | @Override
method originalName (line 601) | private String originalName(int i) {
method originalName (line 605) | private void originalName(int i, String originalName) {
method name (line 609) | private String name(int i) {
method name (line 613) | private void name(int i, String name) {
method value (line 617) | private String value(int i) {
method value (line 621) | private void value(int i, String val) {
method addNormal (line 625) | private void addNormal(String originalName, String normalName, String ...
method truncate (line 634) | private void truncate(int i) {
method isValid (line 645) | private static boolean isValid(@Nullable String value) {
method validateField (line 657) | private static String validateField(@Nullable String value) {
method findInvalid (line 675) | private static int findInvalid(String value) {
FILE: zuul-core/src/main/java/com/netflix/zuul/message/ZuulMessage.java
type ZuulMessage (line 28) | public interface ZuulMessage extends Cloneable {
method getContext (line 33) | SessionContext getContext();
method getHeaders (line 40) | Headers getHeaders();
method setHeaders (line 47) | void setHeaders(Headers newHeaders);
method hasBody (line 53) | boolean hasBody();
method setHasBody (line 59) | void setHasBody(boolean hasBody);
method getBody (line 66) | @Nullable
method getBodyLength (line 72) | int getBodyLength();
method setBody (line 78) | void setBody(@Nullable byte[] body);
method setBodyAsText (line 85) | void setBodyAsText(@Nullable String bodyText);
method bufferBodyContents (line 93) | void bufferBodyContents(HttpContent chunk);
method getBodyContents (line 99) | Iterable<HttpContent> getBodyContents();
method finishBufferedBodyIfIncomplete (line 106) | boolean finishBufferedBodyIfIncomplete();
method hasCompleteBody (line 111) | boolean hasCompleteBody();
method runBufferedBodyContentThroughFilter (line 116) | void runBufferedBodyContentThroughFilter(ZuulFilter<?, ?> filter);
method disposeBufferedBody (line 122) | void disposeBufferedBody();
method getBodyAsText (line 127) | @Nullable
method resetBodyReader (line 134) | void resetBodyReader();
method getMaxBodySize (line 140) | int getMaxBodySize();
method clone (line 145) | ZuulMessage clone();
method getInfoForLogging (line 150) | String getInfoForLogging();
FILE: zuul-core/src/main/java/com/netflix/zuul/message/ZuulMessageImpl.java
class ZuulMessageImpl (line 40) | public class ZuulMessageImpl implements ZuulMessage {
method ZuulMessageImpl (line 51) | public ZuulMessageImpl(SessionContext context) {
method ZuulMessageImpl (line 55) | public ZuulMessageImpl(SessionContext context, Headers headers) {
method getContext (line 61) | @Override
method getHeaders (line 66) | @Override
method setHeaders (line 71) | @Override
method getMaxBodySize (line 76) | @Override
method setHasBody (line 81) | @Override
method hasBody (line 86) | @Override
method hasCompleteBody (line 91) | @Override
method bufferBodyContents (line 96) | @Override
method setContentLength (line 107) | private void setContentLength(int length) {
method setBodyAsText (line 112) | @Override
method setBody (line 125) | @Override
method getBodyAsText (line 138) | @Override
method getBody (line 144) | @Override
method getBodyLength (line 162) | @Override
method getBodyContents (line 172) | @Override
method resetBodyReader (line 177) | @Override
method finishBufferedBodyIfIncomplete (line 184) | @Override
method disposeBufferedBody (line 193) | @Override
method runBufferedBodyContentThroughFilter (line 204) | @Override
method clone (line 225) | @Override
method getInfoForLogging (line 238) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/message/http/Cookies.java
class Cookies (line 32) | public class Cookies {
method add (line 36) | public void add(Cookie cookie) {
method getAll (line 41) | public List<Cookie> getAll() {
method getNames (line 45) | public Set<String> getNames() {
method get (line 49) | public List<Cookie> get(String name) {
method getFirst (line 53) | public Cookie getFirst(String name) {
method getFirstValue (line 61) | public String getFirstValue(String name) {
FILE: zuul-core/src/main/java/com/netflix/zuul/message/http/HttpHeaderNames.java
class HttpHeaderNames (line 33) | public final class HttpHeaderNames {
method get (line 100) | public static HeaderName get(String name) {
FILE: zuul-core/src/main/java/com/netflix/zuul/message/http/HttpHeaderNamesCache.java
class HttpHeaderNamesCache (line 27) | public class HttpHeaderNamesCache {
method HttpHeaderNamesCache (line 31) | public HttpHeaderNamesCache(int initialSize, int maxSize) {
method isFull (line 36) | public boolean isFull() {
method get (line 40) | public HeaderName get(String name) {
FILE: zuul-core/src/main/java/com/netflix/zuul/message/http/HttpQueryParams.java
class HttpQueryParams (line 39) | public class HttpQueryParams implements Cloneable {
method HttpQueryParams (line 44) | public HttpQueryParams() {
method HttpQueryParams (line 50) | private HttpQueryParams(ListMultimap<String, String> delegate) {
method parse (line 56) | public static HttpQueryParams parse(String queryString) {
method getFirst (line 107) | public String getFirst(String name) {
method get (line 115) | public List<String> get(String name) {
method contains (line 119) | public boolean contains(String name) {
method contains (line 123) | public boolean contains(String name, String value) {
method containsIgnoreCase (line 131) | public boolean containsIgnoreCase(String name) {
method set (line 138) | public void set(String name, String value) {
method add (line 143) | public void add(String name, String value) {
method removeAll (line 147) | public void removeAll(String name) {
method clear (line 151) | public void clear() {
method entries (line 155) | public Collection<Map.Entry<String, String>> entries() {
method keySet (line 159) | public Set<String> keySet() {
method toEncodedString (line 163) | public String toEncodedString() {
method toString (line 183) | @Override
method clone (line 202) | @Override
method immutableCopy (line 209) | public HttpQueryParams immutableCopy() {
method isImmutable (line 213) | public boolean isImmutable() {
method isTrailingEquals (line 217) | public boolean isTrailingEquals(String key) {
method setTrailingEquals (line 221) | public void setTrailingEquals(String key, boolean trailingEquals) {
method hashCode (line 225) | @Override
method equals (line 230) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/message/http/HttpRequestInfo.java
type HttpRequestInfo (line 28) | public interface HttpRequestInfo extends ZuulMessage {
method getProtocol (line 29) | String getProtocol();
method getMethod (line 31) | String getMethod();
method getPath (line 33) | String getPath();
method getQueryParams (line 35) | HttpQueryParams getQueryParams();
method getPathAndQuery (line 37) | String getPathAndQuery();
method getHeaders (line 39) | @Override
method getClientIp (line 42) | String getClientIp();
method getScheme (line 44) | String getScheme();
method getPort (line 46) | int getPort();
method getServerName (line 48) | String getServerName();
method getMaxBodySize (line 50) | @Override
method getInfoForLogging (line 53) | @Override
method getOriginalHost (line 56) | String getOriginalHost();
method getOriginalScheme (line 58) | String getOriginalScheme();
method getOriginalProtocol (line 60) | String getOriginalProtocol();
method getOriginalPort (line 62) | int getOriginalPort();
method getClientDestinationPort (line 69) | default Optional<Integer> getClientDestinationPort() {
method reconstructURI (line 73) | String reconstructURI();
method parseCookies (line 76) | Cookies parseCookies();
method reParseCookies (line 82) | Cookies reParseCookies();
FILE: zuul-core/src/main/java/com/netflix/zuul/message/http/HttpRequestMessage.java
type HttpRequestMessage (line 26) | public interface HttpRequestMessage extends HttpRequestInfo {
method setProtocol (line 27) | void setProtocol(String protocol);
method setMethod (line 29) | void setMethod(String method);
method setPath (line 31) | void setPath(String path);
method setScheme (line 33) | void setScheme(String scheme);
method setServerName (line 35) | void setServerName(String serverName);
method clone (line 37) | @Override
method storeInboundRequest (line 40) | void storeInboundRequest();
method getInboundRequest (line 42) | HttpRequestInfo getInboundRequest();
method setQueryParams (line 44) | void setQueryParams(HttpQueryParams queryParams);
FILE: zuul-core/src/main/java/com/netflix/zuul/message/http/HttpRequestMessageImpl.java
class HttpRequestMessageImpl (line 53) | public class HttpRequestMessageImpl implements HttpRequestMessage {
method toString (line 104) | @Override
method HttpRequestMessageImpl (line 110) | public HttpRequestMessageImpl(
method HttpRequestMessageImpl (line 136) | public HttpRequestMessageImpl(
method immutableCheck (line 170) | private void immutableCheck() {
method getContext (line 177) | @Override
method getHeaders (line 182) | @Override
method setHeaders (line 187) | @Override
method setHasBody (line 193) | @Override
method hasBody (line 198) | @Override
method bufferBodyContents (line 203) | @Override
method setBodyAsText (line 208) | @Override
method setBody (line 213) | @Override
method finishBufferedBodyIfIncomplete (line 218) | @Override
method getBodyContents (line 223) | @Override
method runBufferedBodyContentThroughFilter (line 228) | @Override
method getBodyAsText (line 233) | @Override
method getBody (line 238) | @Override
method getBodyLength (line 243) | @Override
method resetBodyReader (line 248) | @Override
method hasCompleteBody (line 253) | @Override
method disposeBufferedBody (line 258) | @Override
method getProtocol (line 263) | @Override
method setProtocol (line 268) | @Override
method getMethod (line 274) | @Override
method setMethod (line 279) | @Override
method getPath (line 285) | @Override
method getDecodedPath (line 293) | public String getDecodedPath() {
method setPath (line 297) | @Override
method getQueryParams (line 304) | @Override
method getPathAndQuery (line 309) | @Override
method generatePathAndQuery (line 322) | protected String generatePathAndQuery() {
method getClientIp (line 330) | @Override
method setClientIp (line 335) | @Deprecated
method getScheme (line 346) | @Override
method setScheme (line 351) | @Override
method getPort (line 357) | @Override
method setPort (line 362) | @Deprecated
method getServerName (line 369) | @Override
method setServerName (line 374) | @Override
method parseCookies (line 380) | @Override
method reParseCookies (line 388) | @Override
method cleanCookieHeader (line 413) | @VisibleForTesting
method getMaxBodySize (line 424) | @Override
method clone (line 429) | @Override
method copyRequestInfo (line 450) | protected HttpRequestInfo copyRequestInfo() {
method storeInboundRequest (line 469) | @Override
method getInboundRequest (line 474) | @Override
method setQueryParams (line 479) | @Override
method getInfoForLogging (line 485) | @Override
method generateInfoForLogging (line 498) | protected String generateInfoForLogging() {
method getOriginalHost (line 516) | @Override
method getOriginalHost (line 528) | @VisibleForTesting
method getOriginalScheme (line 541) | @Override
method getOriginalProtocol (line 550) | @Override
method getOriginalPort (line 559) | @Override
method getOriginalPort (line 564) | @VisibleForTesting
method getClientDestinationPort (line 587) | @Override
method parseHostHeader (line 603) | private static Pair<String, Integer> parseHostHeader(Headers headers) ...
method reconstructURI (line 650) | @Override
method _reconstructURI (line 663) | protected String _reconstructURI() {
method toString (line 691) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/message/http/HttpResponseInfo.java
type HttpResponseInfo (line 26) | public interface HttpResponseInfo extends ZuulMessage {
method getStatus (line 27) | int getStatus();
method getInboundRequest (line 30) | HttpRequestInfo getInboundRequest();
method clone (line 32) | @Override
method getInfoForLogging (line 35) | @Override
method parseSetCookieHeader (line 38) | Cookies parseSetCookieHeader(String setCookieValue);
method hasSetCookieWithName (line 40) | boolean hasSetCookieWithName(String cookieName);
FILE: zuul-core/src/main/java/com/netflix/zuul/message/http/HttpResponseMessage.java
type HttpResponseMessage (line 26) | public interface HttpResponseMessage extends HttpResponseInfo {
method setStatus (line 27) | void setStatus(int status);
method getMaxBodySize (line 29) | @Override
method addSetCookie (line 32) | void addSetCookie(Cookie cookie);
method setSetCookie (line 34) | void setSetCookie(Cookie cookie);
method removeExistingSetCookie (line 36) | boolean removeExistingSetCookie(String cookieName);
method getOutboundRequest (line 39) | HttpRequestMessage getOutboundRequest();
method getInboundResponse (line 42) | HttpResponseInfo getInboundResponse();
method storeInboundResponse (line 46) | void storeInboundResponse();
FILE: zuul-core/src/main/java/com/netflix/zuul/message/http/HttpResponseMessageImpl.java
class HttpResponseMessageImpl (line 38) | public class HttpResponseMessageImpl implements HttpResponseMessage {
method HttpResponseMessageImpl (line 48) | public HttpResponseMessageImpl(SessionContext context, HttpRequestMess...
method HttpResponseMessageImpl (line 52) | public HttpResponseMessageImpl(SessionContext context, Headers headers...
method defaultErrorResponse (line 64) | public static HttpResponseMessage defaultErrorResponse(HttpRequestMess...
method getHeaders (line 70) | @Override
method getContext (line 75) | @Override
method setHeaders (line 80) | @Override
method setHasBody (line 85) | @Override
method hasBody (line 90) | @Override
method bufferBodyContents (line 95) | @Override
method setBodyAsText (line 100) | @Override
method setBody (line 105) | @Override
method getBodyAsText (line 110) | @Override
method getBody (line 115) | @Override
method getBodyLength (line 120) | @Override
method hasCompleteBody (line 125) | @Override
method finishBufferedBodyIfIncomplete (line 130) | @Override
method getBodyContents (line 135) | @Override
method resetBodyReader (line 140) | @Override
method runBufferedBodyContentThroughFilter (line 145) | @Override
method disposeBufferedBody (line 150) | @Override
method getInboundRequest (line 155) | @Override
method getOutboundRequest (line 160) | @Override
method getStatus (line 165) | @Override
method setStatus (line 170) | @Override
method getMaxBodySize (line 175) | @Override
method parseSetCookieHeader (line 180) | @Override
method hasSetCookieWithName (line 187) | @Override
method removeExistingSetCookie (line 198) | @Override
method addSetCookie (line 227) | @Override
method setSetCookie (line 232) | @Override
method clone (line 237) | @Override
method copyResponseInfo (line 248) | protected HttpResponseInfo copyResponseInfo() {
method toString (line 255) | @Override
method storeInboundResponse (line 264) | @Override
method getInboundResponse (line 269) | @Override
method getInfoForLogging (line 274) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/message/util/HttpRequestBuilder.java
class HttpRequestBuilder (line 43) | public final class HttpRequestBuilder {
method HttpRequestBuilder (line 56) | public HttpRequestBuilder(SessionContext context) {
method withDefaults (line 74) | public HttpRequestMessage withDefaults() {
method withHost (line 78) | public HttpRequestBuilder withHost(String hostName) {
method withHeaders (line 83) | public HttpRequestBuilder withHeaders(Headers requestHeaders) {
method withQueryParams (line 88) | public HttpRequestBuilder withQueryParams(HttpQueryParams requestParam...
method withMethod (line 93) | public HttpRequestBuilder withMethod(HttpMethod httpMethod) {
method withUri (line 98) | public HttpRequestBuilder withUri(String uri) {
method withPort (line 103) | public HttpRequestBuilder withPort(int port) {
method build (line 113) | public HttpRequestMessage build() {
FILE: zuul-core/src/main/java/com/netflix/zuul/metrics/OriginStats.java
type OriginStats (line 23) | public interface OriginStats {
method started (line 24) | public void started();
method completed (line 26) | public void completed(boolean success, long totalTimeMS);
FILE: zuul-core/src/main/java/com/netflix/zuul/metrics/OriginStatsFactory.java
type OriginStatsFactory (line 23) | public interface OriginStatsFactory {
method create (line 24) | public OriginStats create(String name);
FILE: zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnCounter.java
class ConnCounter (line 35) | @SuppressWarnings("ErroneousBitwiseExpression")
method ConnCounter (line 69) | private ConnCounter(Registry registry, Channel chan, Id metricBase) {
method install (line 75) | public static ConnCounter install(Channel chan, Registry registry, Id ...
method from (line 83) | public static ConnCounter from(Channel chan) {
method increment (line 95) | public void increment(String event) {
method increment (line 99) | public void increment(String event, Attrs extraDimensions) {
method getCurrentActiveConns (line 127) | public double getCurrentActiveConns() {
method decrement (line 131) | public void decrement(String event) {
method getLock (line 151) | private static Object getLock(Id id) {
FILE: zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnTimer.java
class ConnTimer (line 38) | public final class ConnTimer {
method ConnTimer (line 60) | private ConnTimer(Registry registry, Channel chan, Id metricBase) {
method install (line 71) | public static ConnTimer install(Channel chan, Registry registry, Id me...
method from (line 79) | public static ConnTimer from(Channel chan) {
method record (line 91) | public void record(Long now, String event) {
method record (line 95) | public void record(Long now, String event, Attrs extraDimensions) {
method buildId (line 130) | private Id buildId(Id base, String from, String to, Map<String, String...
FILE: zuul-core/src/main/java/com/netflix/zuul/monitoring/MonitoringHelper.java
class MonitoringHelper (line 22) | public class MonitoringHelper {
method initMocks (line 24) | public static final void initMocks() {
class TracerFactoryImpl (line 28) | private static final class TracerFactoryImpl extends TracerFactory {
method startMicroTracer (line 29) | @Override
class TracerImpl (line 35) | private static final class TracerImpl implements Tracer {
method setName (line 36) | @Override
method stopAndLog (line 39) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/monitoring/Tracer.java
type Tracer (line 23) | public interface Tracer {
method stopAndLog (line 29) | void stopAndLog();
method setName (line 36) | void setName(String name);
FILE: zuul-core/src/main/java/com/netflix/zuul/monitoring/TracerFactory.java
class TracerFactory (line 24) | public abstract class TracerFactory {
method initialize (line 33) | public static final void initialize(TracerFactory f) {
method instance (line 42) | public static final TracerFactory instance() {
method startMicroTracer (line 49) | public abstract Tracer startMicroTracer(String name);
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/ChannelUtils.java
class ChannelUtils (line 22) | public class ChannelUtils {
method channelInfoForLogging (line 23) | public static String channelInfoForLogging(Channel ch) {
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/NettyRequestAttemptFactory.java
class NettyRequestAttemptFactory (line 33) | public class NettyRequestAttemptFactory {
method mapNettyToOutboundErrorType (line 37) | public ErrorType mapNettyToOutboundErrorType(Throwable t) {
method mapNettyToOutboundException (line 79) | public OutboundException mapNettyToOutboundException(Throwable t, Sess...
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/RequestCancelledEvent.java
class RequestCancelledEvent (line 24) | public class RequestCancelledEvent {}
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/SpectatorUtils.java
class SpectatorUtils (line 25) | public final class SpectatorUtils {
method SpectatorUtils (line 26) | private SpectatorUtils() {}
method newCounter (line 28) | public static Counter newCounter(String name, String id) {
method newCounter (line 32) | public static Counter newCounter(String name, String id, String... tag...
method newTimer (line 37) | public static Timer newTimer(String name, String id) {
method newTimer (line 41) | public static Timer newTimer(String name, String id, String... tags) {
method newGauge (line 45) | public static <T extends Number> T newGauge(String name, String id, T ...
method newGauge (line 51) | public static <T extends Number> T newGauge(String name, String id, T ...
method getTagsWithId (line 57) | private static String[] getTagsWithId(String id, String[] tags) {
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/BasicRequestStat.java
class BasicRequestStat (line 28) | public class BasicRequestStat implements RequestStat {
method BasicRequestStat (line 33) | public BasicRequestStat() {
method server (line 38) | @Override
method isFinished (line 43) | @Override
method duration (line 48) | @Override
method serviceUnavailable (line 54) | @Override
method generalError (line 59) | @Override
method failAndSetErrorCode (line 64) | @Override
method updateWithHttpStatusCode (line 69) | @Override
method finalAttempt (line 74) | @Override
method finishIfNotAlready (line 77) | @Override
method publishMetrics (line 90) | protected void publishMetrics() {
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ClientChannelManager.java
type ClientChannelManager (line 31) | public interface ClientChannelManager {
method init (line 32) | void init();
method isAvailable (line 34) | boolean isAvailable();
method getInflightRequestsCount (line 36) | int getInflightRequestsCount();
method shutdown (line 38) | void shutdown();
method gracefulShutdown (line 40) | default void gracefulShutdown() {
method release (line 44) | boolean release(PooledConnection conn);
method acquire (line 46) | Promise<PooledConnection> acquire(EventLoop eventLoop);
method acquire (line 48) | Promise<PooledConnection> acquire(
method isCold (line 55) | boolean isCold();
method remove (line 57) | boolean remove(PooledConnection conn);
method getConnsInPool (line 59) | int getConnsInPool();
method getConnsInUse (line 61) | int getConnsInUse();
method getConfig (line 63) | ConnectionPoolConfig getConfig();
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ClientTimeoutHandler.java
class ClientTimeoutHandler (line 35) | public final class ClientTimeoutHandler {
class InboundHandler (line 41) | public static final class InboundHandler extends ChannelInboundHandler...
method channelRead (line 42) | @Override
class OutboundHandler (line 56) | public static final class OutboundHandler extends ChannelOutboundHandl...
method write (line 57) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ConnectionPoolConfig.java
type ConnectionPoolConfig (line 24) | public interface ConnectionPoolConfig {
method getOriginName (line 27) | OriginName getOriginName();
method getMaxRequestsPerConnection (line 30) | int getMaxRequestsPerConnection();
method maxConnectionsPerHost (line 33) | int maxConnectionsPerHost();
method perServerWaterline (line 35) | int perServerWaterline();
method getConnectTimeout (line 38) | int getConnectTimeout();
method getIdleTimeout (line 41) | int getIdleTimeout();
method getTcpReceiveBufferSize (line 43) | int getTcpReceiveBufferSize();
method getTcpSendBufferSize (line 45) | int getTcpSendBufferSize();
method getNettyWriteBufferHighWaterMark (line 47) | int getNettyWriteBufferHighWaterMark();
method getNettyWriteBufferLowWaterMark (line 49) | int getNettyWriteBufferLowWaterMark();
method getTcpKeepAlive (line 51) | boolean getTcpKeepAlive();
method getTcpNoDelay (line 53) | boolean getTcpNoDelay();
method getNettyAutoRead (line 55) | boolean getNettyAutoRead();
method isSecure (line 57) | boolean isSecure();
method useIPAddrForServer (line 59) | boolean useIPAddrForServer();
method isCloseOnCircuitBreakerEnabled (line 61) | default boolean isCloseOnCircuitBreakerEnabled() {
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ConnectionPoolConfigImpl.java
class ConnectionPoolConfigImpl (line 28) | public class ConnectionPoolConfigImpl implements ConnectionPoolConfig {
method ConnectionPoolConfigImpl (line 69) | public ConnectionPoolConfigImpl(OriginName originName, IClientConfig c...
method getOriginName (line 74) | @Override
method getConnectTimeout (line 79) | @Override
method getMaxRequestsPerConnection (line 84) | @Override
method maxConnectionsPerHost (line 89) | @Override
method perServerWaterline (line 95) | @Override
method getIdleTimeout (line 100) | @Override
method getTcpKeepAlive (line 106) | @Override
method getTcpNoDelay (line 111) | @Override
method getTcpReceiveBufferSize (line 116) | @Override
method getTcpSendBufferSize (line 121) | @Override
method getNettyWriteBufferHighWaterMark (line 126) | @Override
method getNettyWriteBufferLowWaterMark (line 131) | @Override
method getNettyAutoRead (line 136) | @Override
method isSecure (line 141) | @Override
method useIPAddrForServer (line 146) | @Override
method isCloseOnCircuitBreakerEnabled (line 151) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ConnectionPoolHandler.java
class ConnectionPoolHandler (line 41) | @ChannelHandler.Sharable
method ConnectionPoolHandler (line 48) | @Deprecated
method ConnectionPoolHandler (line 53) | public ConnectionPoolHandler(ConnectionPoolMetrics metrics) {
method userEventTriggered (line 58) | @Override
method exceptionCaught (line 102) | @Override
method channelInactive (line 117) | @Override
method closeConnection (line 126) | private void closeConnection(ChannelHandlerContext ctx, String msg) {
method flagCloseAndReleaseConnection (line 142) | private void flagCloseAndReleaseConnection(PooledConnection pooledConn...
method getConnectionHeader (line 151) | private static String getConnectionHeader(CompleteEvent completeEvt) {
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ConnectionPoolMetrics.java
method create (line 55) | public static ConnectionPoolMetrics create(OriginName originName, Regist...
method newCounter (line 113) | private static Counter newCounter(String metricName, OriginName originNa...
method newGauge (line 117) | private static AtomicInteger newGauge(String metricName, OriginName orig...
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java
class DefaultClientChannelManager (line 61) | public class DefaultClientChannelManager implements ClientChannelManager {
method DefaultClientChannelManager (line 78) | public DefaultClientChannelManager(OriginName originName, IClientConfi...
method DefaultClientChannelManager (line 82) | public DefaultClientChannelManager(
method init (line 96) | @Override
method createChannelInitializer (line 105) | protected OriginChannelInitializer createChannelInitializer(
method createNettyClientConnectionFactory (line 110) | protected NettyClientConnectionFactory createNettyClientConnectionFact...
method getConfig (line 115) | @Override
method isAvailable (line 120) | @Override
method isCold (line 125) | @Override
method getInflightRequestsCount (line 130) | @Override
method shutdown (line 135) | @Override
method gracefulShutdown (line 151) | @Override
method release (line 159) | @Override
method isConnectionExpired (line 222) | protected boolean isConnectionExpired(long usageCount) {
method updateServerStatsOnRelease (line 228) | protected void updateServerStatsOnRelease(PooledConnection conn) {
method releaseHandlers (line 234) | protected void releaseHandlers(PooledConnection conn) {
method removeHandlerFromPipeline (line 246) | public static void removeHandlerFromPipeline(String handlerName, Chann...
method remove (line 252) | @Override
method acquire (line 274) | @Override
method acquire (line 279) | @Override
method createPooledConnectionFactory (line 336) | protected PooledConnectionFactory createPooledConnectionFactory(
method createConnectionPool (line 345) | protected IConnectionPool createConnectionPool(
class ServerPoolListener (line 383) | final class ServerPoolListener implements ResolverListener<DiscoveryRe...
method onChange (line 384) | @Override
method getConnsInPool (line 401) | @Override
method getConnsInUse (line 406) | @Override
method getPerServerPools (line 411) | protected ConcurrentHashMap<DiscoveryResult, IConnectionPool> getPerSe...
method pickAddressInternal (line 415) | @VisibleForTesting
method pickAddress (line 444) | protected SocketAddress pickAddress(DiscoveryResult chosenServer) {
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultOriginChannelInitializer.java
class DefaultOriginChannelInitializer (line 39) | public class DefaultOriginChannelInitializer extends OriginChannelInitia...
method DefaultOriginChannelInitializer (line 49) | public DefaultOriginChannelInitializer(ConnectionPoolConfig connPoolCo...
method initChannel (line 59) | @Override
method getClientSslContext (line 96) | protected SslContext getClientSslContext(Registry spectatorRegistry) {
method addMethodBindingHandler (line 108) | protected void addMethodBindingHandler(ChannelPipeline pipeline) {}
method getHttpMetricsHandler (line 110) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/IConnectionPool.java
type IConnectionPool (line 30) | public interface IConnectionPool {
method acquire (line 31) | Promise<PooledConnection> acquire(
method release (line 34) | boolean release(PooledConnection conn);
method remove (line 36) | boolean remove(PooledConnection conn);
method shutdown (line 38) | void shutdown();
method drain (line 40) | default void drain() {
method isAvailable (line 44) | boolean isAvailable();
method getConnsInUse (line 46) | int getConnsInUse();
method getConnsInPool (line 48) | int getConnsInPool();
method getConfig (line 50) | ConnectionPoolConfig getConfig();
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/NettyClientConnectionFactory.java
class NettyClientConnectionFactory (line 35) | public class NettyClientConnectionFactory {
method NettyClientConnectionFactory (line 40) | public NettyClientConnectionFactory(
method connect (line 46) | public ChannelFuture connect(
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/OriginChannelInitializer.java
class OriginChannelInitializer (line 29) | public abstract class OriginChannelInitializer extends ChannelInitialize...
method getHttpMetricsHandler (line 31) | public abstract HttpMetricsChannelHandler getHttpMetricsHandler();
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/OriginConnectException.java
class OriginConnectException (line 24) | public class OriginConnectException extends Exception {
method OriginConnectException (line 28) | public OriginConnectException(String message, ErrorType errorType) {
method OriginConnectException (line 34) | public OriginConnectException(String message, Throwable cause, ErrorTy...
method getErrorType (line 40) | public ErrorType getErrorType() {
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java
class PerServerConnectionPool (line 49) | public class PerServerConnectionPool implements IConnectionPool {
method PerServerConnectionPool (line 83) | public PerServerConnectionPool(
method getConfig (line 123) | @Override
method getNiwsClientConfig (line 128) | public IClientConfig getNiwsClientConfig() {
method isAvailable (line 132) | @Override
method onAcquire (line 138) | protected void onAcquire(PooledConnection conn, CurrentPassport passpo...
method removeIdleStateHandler (line 146) | protected void removeIdleStateHandler(PooledConnection conn) {
method acquire (line 152) | @Override
method reusePooledConnection (line 178) | protected void reusePooledConnection(
method updateServerStatsOnAcquire (line 191) | protected void updateServerStatsOnAcquire() {
method tryGettingFromConnectionPool (line 195) | public PooledConnection tryGettingFromConnectionPool(EventLoop eventLo...
method isValidFromPool (line 217) | protected boolean isValidFromPool(PooledConnection conn) {
method initPooledConnection (line 221) | protected void initPooledConnection(PooledConnection conn, Promise<Poo...
method getPoolForEventLoop (line 226) | protected Deque<PooledConnection> getPoolForEventLoop(EventLoop eventL...
method tryMakingNewConnection (line 238) | protected void tryMakingNewConnection(
method isWithinConnectionLimit (line 279) | protected boolean isWithinConnectionLimit(Promise<PooledConnection> pr...
method connectToServer (line 301) | protected ChannelFuture connectToServer(EventLoop eventLoop, CurrentPa...
method handleConnectCompletion (line 305) | protected void handleConnectCompletion(
method updateServerStatsOnConnectCompletion (line 329) | protected void updateServerStatsOnConnectCompletion(ChannelFuture cf) {
method createConnection (line 339) | protected void createConnection(
method release (line 350) | @Override
method isOverPerServerWaterline (line 394) | protected boolean isOverPerServerWaterline(int connectionsInPool) {
method remove (line 399) | @Override
method shutdown (line 422) | @Override
method drain (line 431) | @Override
method getConnsInPool (line 441) | @Override
method getConnsInUse (line 446) | @Override
method getSelectedHostString (line 451) | @Nullable
method drainIdleConnectionsOnEventLoop (line 467) | void drainIdleConnectionsOnEventLoop(EventLoop eventLoop) {
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PooledConnection.java
class PooledConnection (line 35) | public class PooledConnection {
type ConnectionState (line 52) | public enum ConnectionState {
method PooledConnection (line 70) | public PooledConnection(
method setInUse (line 89) | public void setInUse() {
method setConnectionState (line 94) | public void setConnectionState(ConnectionState state) {
method getFromChannel (line 98) | public static PooledConnection getFromChannel(Channel ch) {
method getConfig (line 102) | public ConnectionPoolConfig getConfig() {
method getServer (line 106) | public DiscoveryResult getServer() {
method getChannel (line 110) | public Channel getChannel() {
method getUsageCount (line 114) | public long getUsageCount() {
method incrementUsageCount (line 118) | public void incrementUsageCount() {
method getCreationTS (line 122) | public long getCreationTS() {
method getAgeInMillis (line 126) | public long getAgeInMillis() {
method startRequestTimer (line 130) | public void startRequestTimer() {
method stopRequestTimer (line 134) | public long stopRequestTimer() {
method isActive (line 140) | public boolean isActive() {
method isInPool (line 144) | public boolean isInPool() {
method setInPool (line 148) | public void setInPool(boolean inPool) {
method isShouldClose (line 152) | public boolean isShouldClose() {
method flagShouldClose (line 156) | public void flagShouldClose() {
method close (line 160) | public ChannelFuture close() {
method updateServerStats (line 166) | public void updateServerStats() {
method closeAndRemoveFromPool (line 171) | public ChannelFuture closeAndRemoveFromPool() {
method release (line 176) | public boolean release() {
method removeReadTimeoutHandler (line 199) | public void removeReadTimeoutHandler() {
method removeHandlerFromPipeline (line 206) | private void removeHandlerFromPipeline(String handlerName, ChannelPipe...
method startReadTimeoutHandler (line 212) | public void startReadTimeoutHandler(Duration readTimeout) {
method getConnectionState (line 225) | ConnectionState getConnectionState() {
method isReleased (line 229) | boolean isReleased() {
method toString (line 233) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PooledConnectionFactory.java
type PooledConnectionFactory (line 26) | public interface PooledConnectionFactory {
method create (line 27) | PooledConnection create(Channel ch);
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/RequestStat.java
type RequestStat (line 29) | public interface RequestStat {
method putInSessionContext (line 33) | static RequestStat putInSessionContext(RequestStat stat, SessionContex...
method getFromSessionContext (line 38) | static RequestStat getFromSessionContext(SessionContext context) {
method server (line 42) | RequestStat server(DiscoveryResult server);
method isFinished (line 44) | boolean isFinished();
method duration (line 46) | long duration();
method serviceUnavailable (line 48) | void serviceUnavailable();
method generalError (line 50) | void generalError();
method failAndSetErrorCode (line 52) | void failAndSetErrorCode(ErrorType errorType);
method updateWithHttpStatusCode (line 54) | void updateWithHttpStatusCode(int httpStatusCode);
method finalAttempt (line 56) | void finalAttempt(boolean finalAttempt);
method finishIfNotAlready (line 58) | boolean finishIfNotAlready();
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ZuulNettyExceptionMapper.java
class ZuulNettyExceptionMapper (line 24) | public class ZuulNettyExceptionMapper {}
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/filter/BaseZuulFilterRunner.java
class BaseZuulFilterRunner (line 64) | @ThreadSafe
method BaseZuulFilterRunner (line 83) | protected BaseZuulFilterRunner(
method getChannelHandlerContext (line 98) | @NonNull
method initRunningFilterIndex (line 103) | protected final AtomicInteger initRunningFilterIndex(I zuulMesg) {
method getRunningFilterIndex (line 109) | protected final AtomicInteger getRunningFilterIndex(I zuulMesg) {
method isFilterAwaitingBody (line 115) | protected final boolean isFilterAwaitingBody(SessionContext context) {
method setFilterAwaitingBody (line 119) | protected final void setFilterAwaitingBody(I zuulMesg, boolean flag) {
method invokeNextStage (line 127) | protected final void invokeNextStage(O zuulMesg, HttpContent chunk) {
method invokeNextStage (line 154) | protected final void invokeNextStage(O zuulMesg) {
method addPerfMarkTags (line 181) | protected final void addPerfMarkTags(ZuulMessage inMesg) {
method executeFilter (line 198) | protected final FilterExecutionResult<O> executeFilter(ZuulFilter<I, O...
method checkFilterPreconditions (line 244) | @Nullable
method executeSyncFilter (line 267) | private FilterExecutionResult<O> executeSyncFilter(
method executeAsyncFilter (line 281) | private FilterExecutionResult<O> executeAsyncFilter(
method shouldSkipFilter (line 314) | protected final boolean shouldSkipFilter(I inMesg, ZuulFilter<I, O> fi...
method isMessageBodyReadyForFilter (line 333) | private boolean isMessageBodyReadyForFilter(ZuulFilter<I, O> filter, I...
method handleFilterException (line 337) | protected O handleFilterException(I inMesg, ZuulFilter<I, O> filter, T...
method recordFilterError (line 346) | protected void recordFilterError(I inMesg, ZuulFilter<I, O> filter, Th...
method recordFilterCompletion (line 368) | protected void recordFilterCompletion(
method handleException (line 420) | protected void handleException(ZuulMessage zuulMesg, String filterName...
method resume (line 434) | protected abstract void resume(O zuulMesg);
method methodBinding (line 436) | protected MethodBinding<?> methodBinding(ZuulMessage zuulMesg) {
method resumeInBindingContext (line 440) | protected void resumeInBindingContext(O zuulMesg, String filterName) {
type FilterExecutionResult (line 452) | protected sealed interface FilterExecutionResult<O> {
method pending (line 459) | @SuppressWarnings("unchecked")
method completed (line 464) | static <O> FilterExecutionResult<O> completed(O message) {
class FilterChainResumer (line 469) | private final class FilterChainResumer implements Observer<O> {
method FilterChainResumer (line 483) | public FilterChainResumer(I inMesg, ZuulFilter<I, O> filter, ZuulMes...
method decrementConcurrency (line 491) | void decrementConcurrency() {
method onNext (line 497) | @Override
method onError (line 509) | @Override
method onCompleted (line 522) | @Override
method onNextStarted (line 537) | private Action1<O> onNextStarted(Link onNextLinkIn) {
method onErrorStarted (line 546) | private Action1<Throwable> onErrorStarted(Link onErrorLinkIn) {
method onCompletedStarted (line 555) | private Action0 onCompletedStarted(Link onCompletedLinkIn) {
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/filter/EventExecutorScheduler.java
class EventExecutorScheduler (line 40) | public class EventExecutorScheduler extends Scheduler {
method EventExecutorScheduler (line 44) | public EventExecutorScheduler(EventExecutor executor) {
method createWorker (line 48) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/filter/FilterConstraints.java
class FilterConstraints (line 36) | @NullMarked
method FilterConstraints (line 45) | public FilterConstraints(List<FilterConstraint> constraints) {
method isConstrained (line 53) | public boolean isConstrained(ZuulMessage msg, ZuulFilter<?, ?> filter) {
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/filter/FilterRunner.java
type FilterRunner (line 25) | public interface FilterRunner<I extends ZuulMessage, O extends ZuulMessa...
method filter (line 27) | void filter(I zuulMesg);
method filter (line 29) | void filter(I zuulMesg, HttpContent chunk);
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/filter/ZuulEndPointRunner.java
class ZuulEndPointRunner (line 53) | @ThreadSafe
method ZuulEndPointRunner (line 63) | public ZuulEndPointRunner(
method getEndpoint (line 73) | @Nullable
method getEndpoint (line 82) | protected ZuulFilter<HttpRequestMessage, HttpResponseMessage> getEndpo...
method setEndpoint (line 106) | public static void setEndpoint(
method filter (line 111) | @Override
method filter (line 146) | @Override
method resume (line 191) | @Override
method getEndPointName (line 201) | protected String getEndPointName(SessionContext zuulCtx) {
method newProxyEndpoint (line 218) | protected ZuulFilter<HttpRequestMessage, HttpResponseMessage> newProxy...
method getEndpointFilter (line 223) | protected <I extends ZuulMessage, O extends ZuulMessage> Endpoint<I, O...
method apply (line 229) | @Override
method filterName (line 236) | @Override
method getDefaultOutput (line 241) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/filter/ZuulFilterChainHandler.java
class ZuulFilterChainHandler (line 53) | public class ZuulFilterChainHandler extends ChannelInboundHandlerAdapter {
method ZuulFilterChainHandler (line 61) | public ZuulFilterChainHandler(
method channelRead (line 68) | @Override
method userEventTriggered (line 87) | @Override
method sendResponse (line 109) | private void sendResponse(StatusCategory statusCategory, int status, C...
method getZuulRequest (line 126) | protected HttpRequestMessage getZuulRequest() {
method fireEndpointFinish (line 130) | protected void fireEndpointFinish(boolean error, ChannelHandlerContext...
method finishResponseFilters (line 141) | private void finishResponseFilters(ChannelHandlerContext ctx) {
method exceptionCaught (line 157) | @Override
method isClientChannelClosed (line 180) | private boolean isClientChannelClosed(Throwable cause) {
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/filter/ZuulFilterChainRunner.java
class ZuulFilterChainRunner (line 40) | @ThreadSafe
method ZuulFilterChainRunner (line 45) | public ZuulFilterChainRunner(
method ZuulFilterChainRunner (line 55) | public ZuulFilterChainRunner(
method filter (line 63) | @Override
method filter (line 71) | @Override
method resume (line 140) | @Override
method runFilters (line 149) | private final void runFilters(T mesg, AtomicInteger runningFilterIdx) {
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/insights/PassportLoggingHandler.java
class PassportLoggingHandler (line 47) | @ChannelHandler.Sharable
method PassportLoggingHandler (line 58) | public PassportLoggingHandler(Registry spectatorRegistry) {
method userEventTriggered (line 62) | @Override
method logPassport (line 77) | private void logPassport(Channel channel) {
method isHealthcheckRequest (line 149) | protected boolean isHealthcheckRequest(HttpRequestMessage req) {
method getRequestId (line 153) | protected String getRequestId(Channel channel, SessionContext ctx) {
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/insights/PassportStateHttpClientHandler.java
class PassportStateHttpClientHandler (line 35) | public final class PassportStateHttpClientHandler {
method passport (line 37) | private static CurrentPassport passport(ChannelHandlerContext ctx) {
class InboundHandler (line 41) | public static final class InboundHandler extends ChannelInboundHandler...
method channelRead (line 42) | @Override
class OutboundHandler (line 62) | public static final class OutboundHandler extends ChannelOutboundHandl...
method write (line 63) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/insights/PassportStateHttpServerHandler.java
class PassportStateHttpServerHandler (line 36) | public final class PassportStateHttpServerHandler {
method passport (line 38) | private static CurrentPassport passport(ChannelHandlerContext ctx) {
class InboundHandler (line 42) | public static final class InboundHandler extends ChannelInboundHandler...
method channelRead (line 43) | @Override
method userEventTriggered (line 69) | @Override
class OutboundHandler (line 81) | public static final class OutboundHandler extends ChannelOutboundHandl...
method write (line 82) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/insights/PassportStateListener.java
class PassportStateListener (line 24) | public class PassportStateListener implements GenericFutureListener<Futu...
method PassportStateListener (line 29) | public PassportStateListener(CurrentPassport passport, PassportState s...
method PassportStateListener (line 35) | public PassportStateListener(CurrentPassport passport, PassportState s...
method operationComplete (line 41) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/insights/PassportStateOriginHandler.java
class PassportStateOriginHandler (line 32) | public final class PassportStateOriginHandler {
method passport (line 33) | private static CurrentPassport passport(ChannelHandlerContext ctx) {
class InboundHandler (line 37) | public static final class InboundHandler extends ChannelInboundHandler...
method channelActive (line 39) | @Override
method channelInactive (line 45) | @Override
method exceptionCaught (line 51) | @Override
class OutboundHandler (line 58) | public static final class OutboundHandler extends ChannelOutboundHandl...
method disconnect (line 60) | @Override
method close (line 66) | @Override
method exceptionCaught (line 72) | @Override
method connect (line 78) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/insights/ServerStateHandler.java
class ServerStateHandler (line 35) | public final class ServerStateHandler {
method passport (line 39) | private static CurrentPassport passport(ChannelHandlerContext ctx) {
class InboundHandler (line 43) | public static final class InboundHandler extends ChannelInboundHandler...
method InboundHandler (line 50) | public InboundHandler(Registry registry, String metricId) {
method channelActive (line 57) | @Override
method channelInactive (line 65) | @Override
method exceptionCaught (line 73) | @Override
method userEventTriggered (line 89) | @Override
class OutboundHandler (line 102) | public static final class OutboundHandler extends ChannelOutboundHandl...
method OutboundHandler (line 106) | public OutboundHandler(Registry registry) {
method close (line 110) | @Override
method disconnect (line 116) | @Override
method exceptionCaught (line 122) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/ratelimiting/NullChannelHandlerProvider.java
class NullChannelHandlerProvider (line 23) | @Singleton
method get (line 25) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java
class BaseServerStartup (line 55) | public abstract class BaseServerStartup {
method BaseServerStartup (line 79) | @Inject
method server (line 107) | public Server server() {
method init (line 111) | @Inject
method choosePortsAndChannels (line 133) | @Deprecated
method chooseAddrsAndChannels (line 138) | @ForOverride
method defaultChannelDependencies (line 146) | protected ChannelConfig defaultChannelDependencies(String listenAddres...
method defaultChannelDependencies (line 152) | protected ChannelConfig defaultChannelDependencies(ListenerSpec listen...
method addChannelDependencies (line 158) | protected void addChannelDependencies(
method addChannelDependencies (line 186) | protected void addChannelDependencies(
method chooseIntChannelProperty (line 219) | public static int chooseIntChannelProperty(String listenAddressName, S...
method chooseBooleanChannelProperty (line 232) | public static boolean chooseBooleanChannelProperty(
method defaultChannelConfig (line 251) | public static ChannelConfig defaultChannelConfig(String listenAddressN...
method addHttp2DefaultConfig (line 303) | public static void addHttp2DefaultConfig(ChannelConfig config, String ...
method logPortConfigured (line 356) | @Deprecated
method logPortConfigured (line 366) | @Deprecated
method logPortConfigured (line 376) | @Deprecated
method logAddrConfigured (line 381) | protected final void logAddrConfigured(SocketAddress socketAddress) {
method logAddrConfigured (line 385) | protected final void logAddrConfigured(SocketAddress socketAddress, @N...
method logAddrConfigured (line 393) | protected final void logAddrConfigured(
method logSecureAddrConfigured (line 402) | protected final void logSecureAddrConfigured(SocketAddress socketAddre...
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java
class BaseZuulChannelInitializer (line 83) | public abstract class BaseZuulChannelInitializer extends ChannelInitiali...
method BaseZuulChannelInitializer (line 156) | protected BaseZuulChannelInitializer(
method BaseZuulChannelInitializer (line 164) | @Deprecated
method BaseZuulChannelInitializer (line 170) | private BaseZuulChannelInitializer(
method storeChannel (line 235) | protected void storeChannel(Channel ch) {
method addPassportHandler (line 244) | protected void addPassportHandler(ChannelPipeline pipeline) {
method addTcpRelatedHandlers (line 249) | protected void addTcpRelatedHandlers(ChannelPipeline pipeline) {
method addHttp1Handlers (line 257) | protected void addHttp1Handlers(ChannelPipeline pipeline) {
method createHttpServerCodec (line 267) | protected HttpServerCodec createHttpServerCodec() {
method addHttpRelatedHandlers (line 271) | protected void addHttpRelatedHandlers(ChannelPipeline pipeline) {
method addTimeoutHandlers (line 304) | protected void addTimeoutHandlers(ChannelPipeline pipeline) {
method addSslInfoHandlers (line 309) | protected void addSslInfoHandlers(ChannelPipeline pipeline, boolean is...
method addSslClientCertChecks (line 314) | protected void addSslClientCertChecks(ChannelPipeline pipeline) {
method addZuulHandlers (line 323) | protected void addZuulHandlers(ChannelPipeline pipeline) {
method addZuulFilterChainHandler (line 331) | protected void addZuulFilterChainHandler(ChannelPipeline pipeline) {
method getEndpointRunner (line 355) | protected ZuulEndPointRunner getEndpointRunner(
method getFilterChainRunner (line 363) | protected <T extends ZuulMessage> ZuulFilterChainRunner<T> getFilterCh...
method getFilterChainRunner (line 368) | protected <T extends ZuulMessage, R extends ZuulMessage> ZuulFilterCha...
method getFilters (line 373) | @SuppressWarnings("unchecked") // For the conversion from getFiltersBy...
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientConnectionsShutdown.java
class ClientConnectionsShutdown (line 45) | public class ClientConnectionsShutdown {
type ShutdownType (line 55) | public enum ShutdownType {
method ClientConnectionsShutdown (line 64) | public ClientConnectionsShutdown(ChannelGroup channels, EventExecutor ...
method initDiscoveryListener (line 74) | private void initDiscoveryListener() {
method gracefullyShutdownClientChannels (line 97) | public Promise<Void> gracefullyShutdownClientChannels() {
method gracefullyShutdownClientChannels (line 101) | Promise<Void> gracefullyShutdownClientChannels(ShutdownType shutdownTy...
method flagChannelForClose (line 150) | protected void flagChannelForClose(Channel channel, ShutdownType shutd...
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java
class ClientRequestReceiver (line 88) | public class ClientRequestReceiver extends ChannelDuplexHandler {
method ClientRequestReceiver (line 108) | public ClientRequestReceiver(SessionContextDecorator decorator) {
method getRequestFromChannel (line 112) | public static HttpRequestMessage getRequestFromChannel(Channel ch) {
method getResponseFromChannel (line 116) | public static HttpResponseMessage getResponseFromChannel(Channel ch) {
method isLastContentReceivedForChannel (line 120) | public static boolean isLastContentReceivedForChannel(Channel ch) {
method channelRead (line 125) | @Override
method channelReadInternal (line 132) | private void channelReadInternal(ChannelHandlerContext ctx, Object msg) {
method userEventTriggered (line 217) | @Override
method handleClientChannelInactiveEvent (line 291) | protected void handleClientChannelInactiveEvent(@NonNull HttpRequestMe...
method dumpDebugInfo (line 296) | private static void dumpDebugInfo(List<String> debugInfo) {
method handleExpect100Continue (line 300) | private void handleExpect100Continue(ChannelHandlerContext ctx, HttpRe...
method buildZuulHttpRequest (line 317) | private HttpRequestMessage buildZuulHttpRequest(HttpRequest nativeRequ...
method getClientIp (line 408) | protected String getClientIp(Channel channel) {
method parsePath (line 412) | private String parsePath(String uri) {
method copyHeaders (line 464) | private static Headers copyHeaders(HttpRequest req) {
method copyQueryParams (line 473) | public static HttpQueryParams copyQueryParams(HttpRequest nativeReques...
method write (line 480) | @Override
method fireWriteError (line 508) | private void fireWriteError(String requestPart, Throwable cause, Chann...
method isStreamCancelled (line 529) | private boolean isStreamCancelled(Throwable cause) {
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientResponseWriter.java
class ClientResponseWriter (line 63) | public class ClientResponseWriter extends ChannelInboundHandlerAdapter {
method ClientResponseWriter (line 80) | public ClientResponseWriter(RequestCompleteHandler requestCompleteHand...
method ClientResponseWriter (line 84) | public ClientResponseWriter(RequestCompleteHandler requestCompleteHand...
method channelRead (line 90) | @Override
method shouldAllowPreemptiveResponse (line 155) | protected boolean shouldAllowPreemptiveResponse(Channel channel) {
method skipProcessing (line 163) | protected boolean skipProcessing(HttpResponseMessage resp) {
method writeBufferedBodyContent (line 168) | private static void writeBufferedBodyContent(HttpResponseMessage zuulR...
method buildHttpResponse (line 172) | private HttpResponse buildHttpResponse(HttpResponseMessage zuulResp) {
method userEventTriggered (line 215) | @Override
method handleComplete (line 264) | private void handleComplete(Channel channel) {
method completeMetrics (line 281) | protected void completeMetrics(Channel channel, HttpResponseMessage zu...
method exceptionCaught (line 285) | @Override
method channelInactive (line 315) | @Override
method getZuulResponse (line 321) | @VisibleForTesting
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/DefaultEventLoopConfig.java
class DefaultEventLoopConfig (line 25) | @Singleton
method DefaultEventLoopConfig (line 36) | public DefaultEventLoopConfig() {
method DefaultEventLoopConfig (line 41) | public DefaultEventLoopConfig(int eventLoopCount, int acceptorCount) {
method eventLoopCount (line 46) | @Override
method acceptorCount (line 51) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/DirectMemoryMonitor.java
class DirectMemoryMonitor (line 37) | @Singleton
method DirectMemoryMonitor (line 45) | @Inject
method DirectMemoryMonitor (line 65) | public DirectMemoryMonitor() {
method getReservedMemory (line 70) | private static double getReservedMemory(Object discard) {
method getMaxMemory (line 79) | private static double getMaxMemory(Object discard) {
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/EventLoopConfig.java
type EventLoopConfig (line 18) | public interface EventLoopConfig {
method eventLoopCount (line 19) | int eventLoopCount();
method acceptorCount (line 21) | int acceptorCount();
method getBacklogSize (line 26) | default int getBacklogSize() {
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/Http1MutualSslChannelInitializer.java
class Http1MutualSslChannelInitializer (line 34) | public class Http1MutualSslChannelInitializer extends BaseZuulChannelIni...
method Http1MutualSslChannelInitializer (line 42) | @Deprecated
method Http1MutualSslChannelInitializer (line 48) | public Http1MutualSslChannelInitializer(
method initChannel (line 68) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/ListenerSpec.java
method addressEnabledPropertyName (line 40) | public String addressEnabledPropertyName() {
method portPropertyName (line 47) | @Deprecated
method addressPropertyName (line 55) | public String addressPropertyName() {
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/MethodBinding.java
class MethodBinding (line 28) | public class MethodBinding<T> {
method MethodBinding (line 34) | public MethodBinding(BiConsumer<Runnable, T> boundMethod, Callable<T> ...
method bind (line 39) | public void bind(Runnable method) throws Exception {
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/NamedSocketAddress.java
class NamedSocketAddress (line 23) | public final class NamedSocketAddress extends SocketAddress {
method NamedSocketAddress (line 28) | public NamedSocketAddress(String name, SocketAddress delegate) {
method name (line 33) | public String name() {
method unwrap (line 37) | public SocketAddress unwrap() {
method withNewSocket (line 41) | @CheckReturnValue
method toString (line 46) | @Override
method equals (line 51) | @Override
method hashCode (line 63) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/OriginResponseReceiver.java
class OriginResponseReceiver (line 57) | public class OriginResponseReceiver extends ChannelDuplexHandler {
method OriginResponseReceiver (line 68) | public OriginResponseReceiver(ProxyEndpoint edgeProxy) {
method unlinkFromClientRequest (line 72) | public void unlinkFromClientRequest() {
method channelRead (line 76) | @Override
method channelReadInternal (line 83) | protected void channelReadInternal(ChannelHandlerContext ctx, Object m...
method userEventTriggered (line 116) | @Override
method postCompleteHook (line 173) | protected void postCompleteHook(ChannelHandlerContext ctx, Object evt)...
method buildOriginHttpRequest (line 175) | private HttpRequest buildOriginHttpRequest(HttpRequestMessage zuulRequ...
method customRequestProcessing (line 196) | protected void customRequestProcessing(HttpRequestMessage headers) {}
method pathAndQueryString (line 198) | private static String pathAndQueryString(HttpRequestMessage request) {
method write (line 210) | @Override
method writeInternal (line 217) | private void writeInternal(ChannelHandlerContext ctx, Object msg, Chan...
method preWriteHook (line 269) | protected void preWriteHook(ChannelHandlerContext ctx, HttpRequestMess...
method fireWriteError (line 271) | private void fireWriteError(String requestPart, Throwable cause, Chann...
method exceptionCaught (line 282) | @Override
method channelInactive (line 301) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java
class Server (line 92) | public class Server {
method Server (line 142) | @SuppressWarnings("rawtypes")
method Server (line 162) | @SuppressWarnings({"unchecked", "rawtypes"
method Server (line 180) | public Server(
method Server (line 197) | public Server(
method stop (line 215) | public void stop() {
method start (line 221) | public void start() {
method awaitTermination (line 256) | public final void awaitTermination() throws InterruptedException {
method getListeningAddresses (line 262) | public final List<NamedSocketAddress> getListeningAddresses() {
method waitForEachEventLoop (line 269) | @VisibleForTesting
method setupServerBootstrap (line 279) | private ChannelFuture setupServerBootstrap(
method postEventLoopCreationHook (line 326) | public void postEventLoopCreationHook(
class ServerGroup (line 329) | private final class ServerGroup {
method ServerGroup (line 343) | private ServerGroup(String name, int acceptorThreads, int workerThre...
method initializeTransport (line 351) | private void initializeTransport() {
method stop (line 388) | private synchronized void stop() {
class NewConnHandler (line 433) | private final class NewConnHandler extends ChannelInboundHandlerAdapter {
method channelRead (line 435) | @Override
method convertPortMap (line 456) | static Map<NamedSocketAddress, ChannelInitializer<?>> convertPortMap(
method applyServerOption (line 469) | @SuppressWarnings("unchecked")
method epollIsAvailable (line 474) | private static boolean epollIsAvailable() {
method ioUringIsAvailable (line 491) | private static boolean ioUringIsAvailable() {
method kqueueIsAvailable (line 508) | private static boolean kqueueIsAvailable() {
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/ServerTimeout.java
class ServerTimeout (line 19) | public class ServerTimeout {
method ServerTimeout (line 22) | public ServerTimeout(int connectionIdleTimeout) {
method connectionIdleTimeout (line 26) | public int connectionIdleTimeout() {
method defaultRequestExpiryTimeout (line 30) | public int defaultRequestExpiryTimeout() {
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/SocketAddressProperty.java
class SocketAddressProperty (line 52) | public final class SocketAddressProperty extends StringDerivedProperty<S...
type BindType (line 54) | public enum BindType {
method BindType (line 91) | BindType() {
method BindType (line 95) | BindType(Callable<? extends InetAddress> addressFn) {
class Decoder (line 106) | @VisibleForTesting
method apply (line 111) | @Override
method SocketAddressProperty (line 162) | public SocketAddressProperty(String propName, SocketAddress defaultVal...
method SocketAddressProperty (line 166) | public SocketAddressProperty(String propName, String defaultValue) {
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/ZuulDependencyKeys.java
class ZuulDependencyKeys (line 42) | public class ZuulDependencyKeys {
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/ZuulServerChannelInitializer.java
class ZuulServerChannelInitializer (line 29) | public class ZuulServerChannelInitializer extends BaseZuulChannelInitial...
method ZuulServerChannelInitializer (line 31) | public ZuulServerChannelInitializer(
method ZuulServerChannelInitializer (line 39) | @Deprecated
method initChannel (line 45) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/DummyChannelHandler.java
class DummyChannelHandler (line 28) | public class DummyChannelHandler implements ChannelHandler {
method handlerAdded (line 29) | @Override
method handlerRemoved (line 32) | @Override
method exceptionCaught (line 35) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2Configuration.java
class Http2Configuration (line 26) | public class Http2Configuration {
method configureSSL (line 28) | public static SslContext configureSSL(SslContextFactory sslContextFact...
method configureSSLWithH2Disabled (line 59) | public static SslContext configureSSLWithH2Disabled(SslContextFactory ...
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2ConnectionErrorHandler.java
class Http2ConnectionErrorHandler (line 34) | public class Http2ConnectionErrorHandler extends ChannelInboundHandlerAd...
method exceptionCaught (line 38) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2ContentLengthEnforcingHandler.java
class Http2ContentLengthEnforcingHandler (line 35) | public final class Http2ContentLengthEnforcingHandler extends ChannelInb...
method channelRead (line 42) | @Override
method validateRequest (line 62) | private boolean validateRequest(HttpRequest req) {
method validateContent (line 82) | private boolean validateContent(HttpContent httpContent) {
method validateEndOfStream (line 87) | private boolean validateEndOfStream() {
method rejectAndRelease (line 91) | private void rejectAndRelease(ChannelHandlerContext ctx, Object msg) {
method isContentLengthUnset (line 97) | private boolean isContentLengthUnset() {
method incrementSeenContent (line 101) | private void incrementSeenContent(int length) {
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2OrHttpHandler.java
class Http2OrHttpHandler (line 47) | public class Http2OrHttpHandler extends ApplicationProtocolNegotiationHa...
method Http2OrHttpHandler (line 70) | public Http2OrHttpHandler(
method userEventTriggered (line 90) | @Override
method configurePipeline (line 126) | @Override
method configureHttp2 (line 142) | private void configureHttp2(ChannelPipeline pipeline) {
method configureHttp1 (line 173) | private void configureHttp1(ChannelPipeline pipeline) {
method removeSelfIfPresent (line 177) | private void removeSelfIfPresent(ChannelHandlerContext ctx) {
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2ResetFrameHandler.java
class Http2ResetFrameHandler (line 31) | @ChannelHandler.Sharable
method channelRead (line 33) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2SslChannelInitializer.java
class Http2SslChannelInitializer (line 43) | public final class Http2SslChannelInitializer extends BaseZuulChannelIni...
method Http2SslChannelInitializer (line 56) | @Deprecated
method Http2SslChannelInitializer (line 62) | public Http2SslChannelInitializer(
method initChannel (line 76) | @Override
method http1Handlers (line 141) | private void http1Handlers(ChannelPipeline pipeline) {
method http1Codec (line 146) | private void http1Codec(ChannelPipeline pipeline) {
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2StreamErrorHandler.java
class Http2StreamErrorHandler (line 30) | @ChannelHandler.Sharable
method exceptionCaught (line 33) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2StreamHeaderCleaner.java
class Http2StreamHeaderCleaner (line 32) | @ChannelHandler.Sharable
method channelRead (line 34) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2StreamInitializer.java
class Http2StreamInitializer (line 40) | @ChannelHandler.Sharable
method Http2StreamInitializer (line 71) | public Http2StreamInitializer(
method handlerAdded (line 85) | @Override
method addHttp2StreamSpecificHandlers (line 95) | protected void addHttp2StreamSpecificHandlers(ChannelPipeline pipeline) {
method addHttp2MetricsHandlers (line 106) | protected void addHttp2MetricsHandlers(ChannelPipeline pipeline) {
method copyAttrsFromParentChannel (line 111) | protected void copyAttrsFromParentChannel(Channel parent, Channel chil...
method copyAttributesFromParentChannel (line 117) | protected <T> void copyAttributesFromParentChannel(Channel parent, Cha...
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/psk/ExternalTlsPskProvider.java
type ExternalTlsPskProvider (line 19) | public interface ExternalTlsPskProvider {
method provide (line 20) | byte[] provide(byte[] clientPskIdentity, byte[] clientRandom) throws P...
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/psk/PskCreationFailureException.java
class PskCreationFailureException (line 18) | public class PskCreationFailureException extends Exception {
type TlsAlertMessage (line 20) | public enum TlsAlertMessage {
method PskCreationFailureException (line 33) | public PskCreationFailureException(TlsAlertMessage tlsAlertMessage, St...
method PskCreationFailureException (line 38) | public PskCreationFailureException(TlsAlertMessage tlsAlertMessage, St...
method getTlsAlertMessage (line 43) | public TlsAlertMessage getTlsAlertMessage() {
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/psk/TlsPskDecoder.java
class TlsPskDecoder (line 28) | public class TlsPskDecoder extends ByteToMessageDecoder {
method TlsPskDecoder (line 32) | public TlsPskDecoder(TlsPskServerProtocol tlsPskServerProtocol) {
method decode (line 36) | @Override
method writeOutputIfAvailable (line 56) | private void writeOutputIfAvailable(ChannelHandlerContext ctx) {
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/psk/TlsPskHandler.java
class TlsPskHandler (line 36) | public class TlsPskHandler extends ChannelDuplexHandler {
method TlsPskHandler (line 54) | public TlsPskHandler(
method write (line 65) | @Override
method handlerAdded (line 84) | @Override
method channelRegistered (line 89) | @Override
method getApplicationProtocol (line 106) | public String getApplicationProtocol() {
method getSession (line 110) | public SSLSession getSession() {
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/psk/TlsPskServerProtocol.java
class TlsPskServerProtocol (line 26) | public class TlsPskServerProtocol extends TlsServerProtocol {
method getSSLSession (line 28) | public SSLSession getSSLSession() {
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/psk/TlsPskUtils.java
class TlsPskUtils (line 22) | class TlsPskUtils {
method readDirect (line 23) | protected static byte[] readDirect(ByteBuf byteBufMsg) {
method getAppDataBytesAndRelease (line 30) | protected static byte[] getAppDataBytesAndRelease(ByteBuf byteBufMsg) {
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/psk/ZuulPskServer.java
class ZuulPskServer (line 52) | public class ZuulPskServer extends AbstractTlsServer {
class PSKTimings (line 59) | private static class PSKTimings {
method PSKTimings (line 64) | PSKTimings(Registry registry) {
method recordHandshakeStarting (line 68) | public void recordHandshakeStarting() {
method recordHandshakeComplete (line 72) | public void recordHandshakeComplete() {
method ZuulPskServer (line 85) | public ZuulPskServer(
method getCredentials (line 98) | @Override
method getProtocolNames (line 103) | @Override
method notifyHandshakeBeginning (line 112) | @Override
method notifyHandshakeComplete (line 120) | @Override
method getSupportedVersions (line 128) | @Override
method getSupportedCipherSuites (line 133) | @Override
method getServerVersion (line 142) | @Override
method getExternalPSK (line 154) | @Override
method notifyAlertRaised (line 180) | @Override
method notifyAlertReceived (line 198) | @Override
method processClientExtensions (line 205) | @Override
method getServerExtensions (line 213) | @Override
method getServerExtensionsForConnection (line 221) | @Override
method getApplicationProtocol (line 229) | public String getApplicationProtocol() {
method getPRFAlgorithm13 (line 237) | private static int getPRFAlgorithm13(int cipherSuite) {
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/push/PushAuthHandler.java
class PushAuthHandler (line 46) | @ChannelHandler.Sharable
method PushAuthHandler (line 55) | public PushAuthHandler(String pushConnectionPath, String originDomain) {
method sendHttpResponse (line 60) | public final void sendHttpResponse(HttpRequest req, ChannelHandlerCont...
method channelRead0 (line 73) | @Override
method isInvalidOrigin (line 105) | protected boolean isInvalidOrigin(FullHttpRequest req) {
method parseCookies (line 114) | protected final Cookies parseCookies(FullHttpRequest req) {
method isDelayedAuth (line 127) | protected abstract boolean isDelayedAuth(FullHttpRequest req, ChannelH...
method doAuth (line 129) | protected abstract PushUserAuth doAuth(FullHttpRequest req, ChannelHan...
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/push/PushChannelInitializer.java
class PushChannelInitializer (line 30) | public abstract class PushChannelInitializer extends BaseZuulChannelInit...
method PushChannelInitializer (line 35) | @Deprecated
method PushChannelInitializer (line 41) | protected PushChannelInitializer(
method addHttp1Handlers (line 46) | @Override
method addHttpRelatedHandlers (line 54) | @Override
method initChannel (line 59) | @Override
method addPushHandlers (line 69) | protected abstract void addPushHandlers(ChannelPipeline pipeline);
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/push/PushClientProtocolHandler.java
class PushClientProtocolHandler (line 26) | public class PushClientProtocolHandler extends ChannelInboundHandlerAdap...
method isAuthenticated (line 30) | protected boolean isAuthenticated() {
method userEventTriggered (line 34) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/push/PushConnection.java
class PushConnection (line 33) | public class PushConnection {
method PushConnection (line 47) | public PushConnection(PushProtocol pushProtocol, ChannelHandlerContext...
method getSecureToken (line 54) | public String getSecureToken() {
method setSecureToken (line 58) | public void setSecureToken(String secureToken) {
method isRateLimited (line 66) | public synchronized boolean isRateLimited() {
method sendPushMessage (line 87) | public ChannelFuture sendPushMessage(ByteBuf mesg) {
method sendPushMessage (line 91) | public ChannelFuture sendPushMessage(String mesg) {
method sendPing (line 95) | public ChannelFuture sendPing() {
method closeConnection (line 99) | public void closeConnection(WebSocketCloseStatus status, String messag...
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/push/PushConnectionRegistry.java
class PushConnectionRegistry (line 35) | @Singleton
method PushConnectionRegistry (line 41) | @Inject
method get (line 47) | @Nullable
method getAll (line 52) | public List<PushConnection> getAll() {
method getAllEntries (line 56) | public Map<String, PushConnection> getAllEntries() {
method mintNewSecureToken (line 60) | public String mintNewSecureToken() {
method put (line 66) | public void put(String clientId, PushConnection pushConnection) {
method remove (line 71) | public PushConnection remove(String clientId) {
method size (line 76) | public int size() {
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/push/PushMessageFactory.java
class PushMessageFactory (line 26) | public abstract class PushMessageFactory {
method sendErrorAndClose (line 28) | public final void sendErrorAndClose(ChannelHandlerContext ctx, int sta...
method goAwayMessage (line 37) | protected abstract Object goAwayMessage();
method serverClosingConnectionMessage (line 42) | protected abstract Object serverClosingConnectionMessage(int statusCod...
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/push/PushMessageSender.java
class PushMessageSender (line 47) | @ChannelHandler.Sharable
method PushMessageSender (line 55) | @Inject
method sendHttpResponse (line 60) | protected void sendHttpResponse(
method verifySecureToken (line 71) | protected boolean verifySecureToken(FullHttpRequest request, PushConne...
method channelRead0 (line 80) | @Override
method logPushAttempt (line 162) | protected void logPushAttempt() {
method logNoIdentity (line 166) | protected void logNoIdentity() {
method logClientNotConnected (line 170) | protected void logClientNotConnected() {
method logPushSuccess (line 174) | protected void logPushSuccess() {
method logPushError (line 178) | protected void logPushError(Throwable t) {
method logRateLimited (line 182) | protected void logRateLimited() {
method logSecurityTokenVerificationFail (line 186) | protected void logSecurityTokenVerificationFail() {
method logPushEvent (line 190) | protected void logPushEvent(FullHttpRequest request, HttpResponseStatu...
method logPushEventBody (line 194) | protected void logPushEventBody(FullHttpRequest request, ByteBuf body) {
method getPushUserAuth (line 198) | protected abstract PushUserAuth getPushUserAuth(FullHttpRequest request);
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/push/PushMessageSenderInitializer.java
class PushMessageSenderInitializer (line 28) | public abstract class PushMessageSenderInitializer extends ChannelInitia...
method initChannel (line 29) | @Override
method addPushMessageHandlers (line 37) | protected abstract void addPushMessageHandlers(ChannelPipeline pipeline);
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/push/PushProtocol.java
type PushProtocol (line 31) | public enum PushProtocol {
method getHandshakeCompleteEvent (line 33) | @Override
method getPath (line 41) | @Override
method sendPushMessage (line 46) | @Override
method sendPing (line 52) | @Override
method goAwayMessage (line 57) | @Override
method serverClosingConnectionMessage (line 62) | @Override
method getHandshakeCompleteEvent (line 71) | @Override
method getPath (line 76) | @Override
method sendPushMessage (line 84) | @Override
method sendPing (line 99) | @Override
method goAwayMessage (line 107) | @Override
method serverClosingConnectionMessage (line 112) | @Override
method sendErrorAndClose (line 118) | public final void sendErrorAndClose(ChannelHandlerContext ctx, int sta...
method getHandshakeCompleteEvent (line 123) | public abstract Object getHandshakeCompleteEvent();
method getPath (line 125) | public abstract String getPath();
method sendPushMessage (line 127) | public abstract ChannelFuture sendPushMessage(ChannelHandlerContext ct...
method sendPing (line 129) | public abstract ChannelFuture sendPing(ChannelHandlerContext ctx);
method goAwayMessage (line 134) | public abstract Object goAwayMessage();
method serverClosingConnectionMessage (line 138) | public abstract Object serverClosingConnectionMessage(int statusCode, ...
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/push/PushRegistrationHandler.java
class PushRegistrationHandler (line 38) | public class PushRegistrationHandler extends ChannelInboundHandlerAdapter {
method PushRegistrationHandler (line 67) | public PushRegistrationHandler(PushConnectionRegistry pushConnectionRe...
method isAuthenticated (line 74) | protected final boolean isAuthenticated() {
method tearDown (line 78) | protected void tearDown() {
method channelInactive (line 95) | @Override
method exceptionCaught (line 102) | @Override
method forceCloseConnectionFromServerSide (line 108) | protected final void forceCloseConnectionFromServerSide() {
method closeIfNotAuthenticated (line 115) | private void closeIfNotAuthenticated() {
method requestClientToCloseConnection (line 124) | private void requestClientToCloseConnection() {
method keepAlive (line 139) | protected void keepAlive() {
method ditheredReconnectDeadline (line 145) | private int ditheredReconnectDeadline() {
method userEventTriggered (line 150) | @Override
method getKeepAliveInterval (line 182) | protected int getKeepAliveInterval() {
method registerClient (line 200) | protected void registerClient(
method getPushConnection (line 213) | @VisibleForTesting
method getScheduledFutures (line 218) | @VisibleForTesting
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/push/PushUserAuth.java
type PushUserAuth (line 18) | public interface PushUserAuth {
method isSuccess (line 20) | boolean isSuccess();
method statusCode (line 22) | int statusCode();
method getClientIdentity (line 24) | String getClientIdentity();
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/server/ssl/SslHandshakeInfoHandler.java
class SslHandshakeInfoHandler (line 62) | public class SslHandshakeInfoHandler extends ChannelInboundHandlerAdapter {
method SslHandshakeInfoHandler (line 82) | public SslHandshakeInfoHandler(Registry spectatorRegistry, boolean isS...
method SslHandshakeInfoHandler (line 87) | @VisibleForTesting
method userEventTriggered (line 93) | @Override
method getSSLSession (line 256) | private SSLSession getSSLSession(ChannelHandlerContext ctx) {
method whichClientAuthEnum (line 268) | private ClientAuth whichClientAuthEnum(ChannelHandlerContext ctx) {
method incrementCounters (line 285) | private void incrementCounters(
method getFailureCause (line 312) | @VisibleForTesting
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/ssl/BaseSslContextFactory.java
class BaseSslContextFactory (line 60) | public class BaseSslContextFactory implements SslContextFactory {
method BaseSslContextFactory (line 77) | public BaseSslContextFactory(Registry spectatorRegistry, ServerSslConf...
method createBuilderForServer (line 82) | @Override
method newBuilderForServer (line 111) | @ForOverride
method enableSessionTickets (line 120) | @Override
method configureOpenSslStatsMetrics (line 125) | @Override
method openSslStatGauge (line 152) | private void openSslStatGauge(
method chooseSslProvider (line 162) | public static SslProvider chooseSslProvider() {
method getServerSslConfig (line 173) | public ServerSslConfig getServerSslConfig() {
method getProtocols (line 177) | @Override
method getCiphers (line 182) | @Override
method getCiphersFilter (line 187) | protected CipherSuiteFilter getCiphersFilter() {
method getNamedGroups (line 191) | protected String[] getNamedGroups() {
method getTrustedX509Certificates (line 195) | protected List<X509Certificate> getTrustedX509Certificates()
method getTruststorePassword (line 241) | protected String getTruststorePassword(byte[] trustStorePwdBytes) {
method getKeyInputStream (line 248) | protected InputStream getKeyInputStream() throws IOException {
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/ssl/ClientSslContextFactory.java
class ClientSslContextFactory (line 33) | public final class ClientSslContextFactory extends BaseSslContextFactory {
method ClientSslContextFactory (line 45) | public ClientSslContextFactory(Registry spectatorRegistry) {
method ClientSslContextFactory (line 49) | public ClientSslContextFactory(Registry spectatorRegistry, ServerSslCo...
method getClientSslContext (line 53) | public SslContext getClientSslContext() {
method maybeAddTls13 (line 66) | static String[] maybeAddTls13(boolean enableTls13, String... defaultPr...
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/ssl/SslContextFactory.java
type SslContextFactory (line 29) | public interface SslContextFactory {
method createBuilderForServer (line 30) | SslContextBuilder createBuilderForServer();
method getProtocols (line 32) | String[] getProtocols();
method getCiphers (line 34) | List<String> getCiphers() throws NoSuchAlgorithmException;
method enableSessionTickets (line 36) | void enableSessionTickets(SslContext sslContext);
method configureOpenSslStatsMetrics (line 38) | void configureOpenSslStatsMetrics(SslContext sslContext, String sslCon...
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/timeouts/HttpHeadersTimeoutHandler.java
class HttpHeadersTimeoutHandler (line 33) | public class HttpHeadersTimeoutHandler {
class InboundHandler (line 43) | public static class InboundHandler extends ChannelInboundHandlerAdapter {
method InboundHandler (line 52) | public InboundHandler(
method channelActive (line 63) | @Override
method channelRead (line 96) | @Override
method handlerRemoved (line 111) | @Override
method channelInactive (line 116) | @Override
method destroy (line 122) | private void destroy(ChannelHandlerContext ctx) {
FILE: zuul-core/src/main/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManager.java
class OriginTimeoutManager (line 38) | public class OriginTimeoutManager {
method OriginTimeoutManager (line 42) | public OriginTimeoutManager(NettyOrigin origin) {
method computeReadTimeout (line 61) | public Duration computeReadTimeout(HttpRequestMessage request, int att...
method getRequestClientConfig (line 86) | protected IClientConfig getRequestClientConfig(HttpRequestMessage zuul...
method getRequestReadTimeout (line 99) | @Nullable
method getOriginReadTimeout (line 109) | @Nullable
FILE: zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java
class RequestAttempt (line 40) | public class RequestAttempt {
method RequestAttempt (line 62) | public RequestAttempt(
method RequestAttempt (line 116) | public RequestAttempt(
method RequestAttempt (line 163) | private RequestAttempt() {}
method complete (line 165) | public void complete(int responseStatus, long durationMs, Throwable ex...
method getAttempt (line 177) | public int getAttempt() {
method getVip (line 181) | public String getVip() {
method getStatus (line 185) | public int getStatus() {
method getDuration (line 189) | public long getDuration() {
method getCause (line 193) | public String getCause() {
method getError (line 197) | public String getError() {
method getApp (line 201) | public String getApp() {
method getAsg (line 205) | public String getAsg() {
method getInstanceId (line 209) | public String getInstanceId() {
method getHost (line 213) | public String getHost() {
method getPort (line 217) | public int getPort() {
method getIpAddress (line 221) | public String getIpAddress() {
method getRegion (line 225) | public String getRegion() {
method getAvailabilityZone (line 229) | public String getAvailabilityZone() {
method getExceptionType (line 233) | public String getExceptionType() {
method getReadTimeout (line 237) | public long getReadTimeout() {
method getConnectTimeout (line 241) | public int getConnectTimeout() {
method getMaxRetries (line 245) | public int getMaxRetries() {
method setStatus (line 249) | public void setStatus(int status) {
method setError (line 253) | public void setError(String error) {
method setExceptionType (line 257) | public void setExceptionType(String exceptionType) {
method setApp (line 261) | public void setApp(String app) {
method setAsg (line 265) | public void setAsg(String asg) {
method setInstanceId (line 269) | public void setInstanceId(String instanceId) {
method setHost (line 273) | public void setHost(String host) {
method setPort (line 277) | public void setPort(int port) {
method setIpAddress (line 281) | public void setIpAddress(String ipAddress) {
method setVip (line 285) | public void setVip(String vip) {
method setRegion (line 289) | public void setRegion(String region) {
method setAvailabilityZone (line 293) | public void setAvailabilityZone(String availabilityZone) {
method setReadTimeout (line 297) | public void setReadTimeout(long readTimeout) {
method setConnectTimeout (line 301) | public void setConnectTimeout(int connectTimeout) {
method setException (line 305) | public void setException(Throwable t) {
method setMaxRetries (line 353) | public void setMaxRetries(int maxRetries) {
method toString (line 357) | @Override
method toJsonNode (line 366) | public ObjectNode toJsonNode() {
method putNullableAttribute (line 394) | private static ObjectNode putNullableAttribute(ObjectNode node, String...
FILE: zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempts.java
class RequestAttempts (line 35) | public class RequestAttempts extends ArrayList<RequestAttempt> {
method RequestAttempts (line 39) | public RequestAttempts() {
method getFinalAttempt (line 43) | @Nullable
method getFromSessionContext (line 52) | public static RequestAttempts getFromSessionContext(SessionContext ctx) {
method parse (line 56) | public static RequestAttempts parse(String attemptsJson) throws IOExce...
method toJSON (line 60) | public String toJSON() {
method toString (line 73) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java
class BasicNettyOrigin (line 57) | public class BasicNettyOrigin implements NettyOrigin {
method BasicNettyOrigin (line 70) | public BasicNettyOrigin(OriginName originName, Registry registry) {
method setupClientConfig (line 88) | protected IClientConfig setupClientConfig(OriginName originName) {
method createClientChannelManager (line 106) | protected ClientChannelManager createClientChannelManager(
method getName (line 111) | @Override
method isAvailable (line 116) | @Override
method isCold (line 121) | @Override
method connectToOrigin (line 126) | @Override
method getMaxRetriesForRequest (line 137) | @Override
method newRequestAttempt (line 142) | @Override
method getIpAddrFromServer (line 149) | @Override
method getClientConfig (line 155) | @Override
method getSpectatorRegistry (line 160) | @Override
method recordFinalError (line 165) | @Override
method recordFinalResponse (line 182) | @Override
method preRequestChecks (line 205) | @Override
method recordProxyRequestEnd (line 215) | @Override
method getErrorPercentage (line 222) | @Override
method getErrorAllPercentage (line 227) | @Override
method onRequestExecutionStart (line 232) | @Override
method onRequestStartWithServer (line 235) | @Override
method onRequestExceptionWithServer (line 238) | @Override
method onRequestExecutionSuccess (line 242) | @Override
method onRequestExecutionFailed (line 249) | @Override
method adjustRetryPolicyIfNeeded (line 253) | @Override
method recordSuccessResponse (line 256) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOriginManager.java
class BasicNettyOriginManager (line 32) | @Singleton
method BasicNettyOriginManager (line 38) | @Inject
method getOrigin (line 44) | @Override
method createOrigin (line 49) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/origins/InstrumentedOrigin.java
type InstrumentedOrigin (line 26) | public interface InstrumentedOrigin extends Origin {
method getErrorPercentage (line 28) | double getErrorPercentage();
method getErrorAllPercentage (line 30) | double getErrorAllPercentage();
method adjustRetryPolicyIfNeeded (line 32) | void adjustRetryPolicyIfNeeded(HttpRequestMessage zuulRequest);
method preRequestChecks (line 34) | void preRequestChecks(HttpRequestMessage zuulRequest);
method recordSuccessResponse (line 36) | void recordSuccessResponse();
method recordProxyRequestEnd (line 38) | void recordProxyRequestEnd();
FILE: zuul-core/src/main/java/com/netflix/zuul/origins/NettyOrigin.java
type NettyOrigin (line 40) | public interface NettyOrigin extends InstrumentedOrigin {
method connectToOrigin (line 42) | Promise<PooledConnection> connectToOrigin(
method getMaxRetriesForRequest (line 50) | int getMaxRetriesForRequest(SessionContext context);
method onRequestExecutionStart (line 52) | void onRequestExecutionStart(HttpRequestMessage zuulReq);
method onRequestStartWithServer (line 54) | void onRequestStartWithServer(HttpRequestMessage zuulReq, DiscoveryRes...
method onRequestExceptionWithServer (line 56) | void onRequestExceptionWithServer(
method onRequestExecutionSuccess (line 59) | void onRequestExecutionSuccess(
method onRequestExecutionFailed (line 62) | void onRequestExecutionFailed(
method recordFinalError (line 65) | void recordFinalError(HttpRequestMessage requestMsg, Throwable throwab...
method recordFinalResponse (line 67) | void recordFinalResponse(HttpResponseMessage resp);
method newRequestAttempt (line 69) | RequestAttempt newRequestAttempt(
method getIpAddrFromServer (line 72) | String getIpAddrFromServer(DiscoveryResult server);
method getClientConfig (line 74) | IClientConfig getClientConfig();
method getSpectatorRegistry (line 76) | Registry getSpectatorRegistry();
method originRetryPolicyAdjustmentIfNeeded (line 78) | default void originRetryPolicyAdjustmentIfNeeded(HttpRequestMessage zu...
FILE: zuul-core/src/main/java/com/netflix/zuul/origins/Origin.java
type Origin (line 23) | public interface Origin {
method getName (line 24) | OriginName getName();
method isAvailable (line 26) | boolean isAvailable();
method isCold (line 28) | boolean isCold();
FILE: zuul-core/src/main/java/com/netflix/zuul/origins/OriginConcurrencyExceededException.java
class OriginConcurrencyExceededException (line 21) | public class OriginConcurrencyExceededException extends OriginThrottledE...
method OriginConcurrencyExceededException (line 22) | public OriginConcurrencyExceededException(OriginName originName) {
FILE: zuul-core/src/main/java/com/netflix/zuul/origins/OriginManager.java
type OriginManager (line 25) | public interface OriginManager<T extends Origin> {
method getOrigin (line 27) | T getOrigin(OriginName originName, String uri, SessionContext ctx);
method createOrigin (line 29) | T createOrigin(OriginName originName, String uri, SessionContext ctx);
FILE: zuul-core/src/main/java/com/netflix/zuul/origins/OriginName.java
class OriginName (line 42) | public final class OriginName {
method fromVip (line 68) | @Deprecated
method fromVip (line 76) | @Deprecated
method fromVipAndApp (line 85) | public static OriginName fromVipAndApp(String vip, String appName) {
method fromVipAndApp (line 93) | public static OriginName fromVipAndApp(String vip, String appName, Str...
method OriginName (line 97) | private OriginName(String target, String authority, String niwsClientN...
method getTarget (line 107) | public String getTarget() {
method getNiwsClientName (line 115) | public String getNiwsClientName() {
method getMetricId (line 123) | public String getMetricId() {
method getAuthority (line 131) | public String getAuthority() {
method equals (line 135) | @Override
method hashCode (line 146) | @Override
method toString (line 151) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/origins/OriginThrottledException.java
class OriginThrottledException (line 23) | public abstract class OriginThrottledException extends ZuulException {
method OriginThrottledException (line 27) | public OriginThrottledException(OriginName originName, String msg, Sta...
method getOriginName (line 35) | public OriginName getOriginName() {
method getStatusCategory (line 39) | public StatusCategory getStatusCategory() {
FILE: zuul-core/src/main/java/com/netflix/zuul/passport/CurrentPassport.java
class CurrentPassport (line 44) | public class CurrentPassport {
class Unlocker (line 70) | private final class Unlocker implements AutoCloseable {
method close (line 72) | @Override
class IntrospectiveReentrantLock (line 78) | private static final class IntrospectiveReentrantLock extends Reentran...
method getOwner (line 80) | @Override
method lock (line 86) | private Unlocker lock() {
method CurrentPassport (line 103) | CurrentPassport() {
method CurrentPassport (line 107) | @VisibleForTesting
method create (line 115) | public static CurrentPassport create() {
method fromSessionContext (line 122) | public static CurrentPassport fromSessionContext(SessionContext ctx) {
method createForChannel (line 126) | public static CurrentPassport createForChannel(Channel ch) {
method fromChannel (line 132) | public static CurrentPassport fromChannel(Channel ch) {
method fromChannelOrNull (line 141) | public static CurrentPassport fromChannelOrNull(Channel ch) {
method setOnChannel (line 145) | public void setOnChannel(Channel ch) {
method clearFromChannel (line 149) | public static void clearFromChannel(Channel ch) {
method getState (line 153) | public PassportState getState() {
method getHistory (line 160) | @VisibleForTesting
method add (line 168) | public void add(PassportState state) {
method addIfNotAlready (line 182) | public void addIfNotAlready(PassportState state) {
method calculateTimeBetweenFirstAnd (line 188) | public long calculateTimeBetweenFirstAnd(PassportState endState) {
method firstTime (line 203) | public long firstTime() {
method creationTimeSinceEpochMs (line 209) | public long creationTimeSinceEpochMs() {
method calculateTimeBetween (line 213) | public long calculateTimeBetween(StartAndEnd sae) {
method calculateTimeBetweenButIfNoEndThenUseNow (line 220) | public long calculateTimeBetweenButIfNoEndThenUseNow(StartAndEnd sae) {
method findStartAndEndStates (line 233) | public StartAndEnd findStartAndEndStates(PassportState startState, Pas...
method findFirstStartAndLastEndStates (line 248) | public StartAndEnd findFirstStartAndLastEndStates(PassportState startS...
method findLastStartAndFirstEndStates (line 262) | public StartAndEnd findLastStartAndFirstEndStates(PassportState startS...
method findEachPairOf (line 276) | public List<StartAndEnd> findEachPairOf(PassportState startState, Pass...
method findState (line 302) | public PassportItem findState(PassportState state) {
method findStateBackwards (line 313) | public PassportItem findStateBackwards(PassportState state) {
method findStates (line 326) | public List<PassportItem> findStates(PassportState state) {
method findTimes (line 338) | public List<Long> findTimes(PassportState state) {
method wasProxyAttempt (line 351) | public boolean wasProxyAttempt() {
method now (line 357) | private long now() {
method toString (line 361) | @Override
method parseFromToString (line 388) | @VisibleForTesting
class MockTicker (line 419) | private static class MockTicker extends Ticker {
method read (line 422) | @Override
method setNow (line 430) | public void setNow(long now) {
class CountingCurrentPassport (line 436) | class CountingCurrentPassport extends CurrentPassport {
method createCounter (line 449) | private static Counter createCounter(String name) {
method CountingCurrentPassport (line 453) | public CountingCurrentPassport() {
method add (line 458) | @Override
method incrementStateCounter (line 464) | private void incrementStateCounter(PassportState state) {
FILE: zuul-core/src/main/java/com/netflix/zuul/passport/PassportItem.java
class PassportItem (line 19) | public class PassportItem {
method PassportItem (line 23) | public PassportItem(PassportState state, long time) {
method getTime (line 28) | public long getTime() {
method getState (line 32) | public PassportState getState() {
method toString (line 36) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/passport/PassportState.java
type PassportState (line 19) | public enum PassportState {
FILE: zuul-core/src/main/java/com/netflix/zuul/passport/StartAndEnd.java
class StartAndEnd (line 19) | public class StartAndEnd {
method getStart (line 23) | public long getStart() {
method getEnd (line 27) | public long getEnd() {
method startNotFound (line 31) | boolean startNotFound() {
method endNotFound (line 35) | boolean endNotFound() {
FILE: zuul-core/src/main/java/com/netflix/zuul/plugins/Tracer.java
class Tracer (line 31) | public class Tracer extends TracerFactory {
method startMicroTracer (line 33) | @Override
class SpectatorTracer (line 38) | class SpectatorTracer implements com.netflix.zuul.monitoring.Tracer {
method SpectatorTracer (line 43) | private SpectatorTracer(String name) {
method stopAndLog (line 48) | @Override
method setName (line 55) | @Override
method getHostName (line 61) | private static String getHostName() {
method getIp (line 65) | private static String getIp() {
method loadAddress (line 69) | private static InetAddress loadAddress() {
FILE: zuul-core/src/main/java/com/netflix/zuul/stats/AmazonInfoHolder.java
class AmazonInfoHolder (line 25) | public class AmazonInfoHolder {
method getInfo (line 29) | public static final AmazonInfo getInfo() {
method AmazonInfoHolder (line 33) | private AmazonInfoHolder() {}
FILE: zuul-core/src/main/java/com/netflix/zuul/stats/BasicRequestMetricsPublisher.java
class BasicRequestMetricsPublisher (line 26) | public class BasicRequestMetricsPublisher implements RequestMetricsPubli...
method collectAndPublish (line 27) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/stats/ErrorStatsData.java
class ErrorStatsData (line 31) | public class ErrorStatsData implements NamedCount {
method ErrorStatsData (line 42) | public ErrorStatsData(String route, String cause) {
method equals (line 55) | @Override
method hashCode (line 69) | @Override
method update (line 77) | public void update() {
method getName (line 81) | @Override
method getCount (line 86) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/stats/ErrorStatsManager.java
class ErrorStatsManager (line 28) | public class ErrorStatsManager {
method getManager (line 37) | public static ErrorStatsManager getManager() {
method getStats (line 47) | public ErrorStatsData getStats(String route, String cause) {
method putStats (line 60) | public void putStats(String route, String cause) {
class UnitTest (line 83) | public static class UnitTest {}
FILE: zuul-core/src/main/java/com/netflix/zuul/stats/NamedCountingMonitor.java
class NamedCountingMonitor (line 30) | public class NamedCountingMonitor implements NamedCount {
method NamedCountingMonitor (line 36) | public NamedCountingMonitor(String name) {
method register (line 47) | public NamedCountingMonitor register() {
method increment (line 55) | public long increment() {
method getName (line 59) | @Override
method getCount (line 67) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/stats/RequestMetricsPublisher.java
type RequestMetricsPublisher (line 25) | public interface RequestMetricsPublisher {
method collectAndPublish (line 26) | void collectAndPublish(SessionContext context);
FILE: zuul-core/src/main/java/com/netflix/zuul/stats/RouteStatusCodeMonitor.java
class RouteStatusCodeMonitor (line 33) | public class RouteStatusCodeMonitor implements NamedCount {
method RouteStatusCodeMonitor (line 43) | public RouteStatusCodeMonitor(@Nullable String route, int statusCode) {
method equals (line 56) | @Override
method hashCode (line 77) | @Override
method getName (line 84) | @Override
method getCount (line 89) | @Override
method update (line 97) | public void update() {
FILE: zuul-core/src/main/java/com/netflix/zuul/stats/StatsManager.java
class StatsManager (line 36) | public class StatsManager {
method getManager (line 73) | public static StatsManager getManager() {
method getRouteStatusCodeMonitor (line 82) | public RouteStatusCodeMonitor getRouteStatusCodeMonitor(String route, ...
method getHostMonitor (line 90) | @VisibleForTesting
method getProtocolMonitor (line 95) | @VisibleForTesting
method hostKey (line 100) | @VisibleForTesting
method protocolKey (line 128) | private static final String protocolKey(String proto) {
method collectRequestStats (line 138) | public void collectRequestStats(HttpRequestInfo req) {
method isIPv6 (line 178) | @VisibleForTesting
method extractClientIpFromXForwardedFor (line 183) | @VisibleForTesting
method incrementNamedCountingMonitor (line 191) | protected void incrementNamedCountingMonitor(String name, ConcurrentMa...
method collectRouteStats (line 211) | public void collectRouteStats(String route, int statusCode) {
FILE: zuul-core/src/main/java/com/netflix/zuul/stats/monitoring/Monitor.java
type Monitor (line 24) | public interface Monitor {
method register (line 29) | void register(NamedCount monitorObj);
FILE: zuul-core/src/main/java/com/netflix/zuul/stats/monitoring/MonitorRegistry.java
class MonitorRegistry (line 25) | public class MonitorRegistry {
method setPublisher (line 34) | public void setPublisher(Monitor publisher) {
method getInstance (line 38) | public static MonitorRegistry getInstance() {
method registerObject (line 42) | public void registerObject(NamedCount monitorObj) {
FILE: zuul-core/src/main/java/com/netflix/zuul/stats/monitoring/NamedCount.java
type NamedCount (line 24) | public interface NamedCount {
method getName (line 25) | String getName();
method getCount (line 27) | long getCount();
FILE: zuul-core/src/main/java/com/netflix/zuul/stats/status/StatusCategory.java
type StatusCategory (line 27) | @Immutable
method getId (line 29) | String getId();
method getGroup (line 31) | StatusCategoryGroup getGroup();
method getReason (line 33) | String getReason();
method name (line 35) | String name();
FILE: zuul-core/src/main/java/com/netflix/zuul/stats/status/StatusCategoryGroup.java
type StatusCategoryGroup (line 27) | @Immutable
method getId (line 29) | int getId();
method name (line 31) | String name();
FILE: zuul-core/src/main/java/com/netflix/zuul/stats/status/StatusCategoryUtils.java
class StatusCategoryUtils (line 30) | public class StatusCategoryUtils {
method getStatusCategory (line 32) | public static StatusCategory getStatusCategory(ZuulMessage msg) {
method getStatusCategory (line 36) | @Nullable
method getStatusCategoryReason (line 41) | @Nullable
method setStatusCategory (line 46) | public static void setStatusCategory(SessionContext ctx, StatusCategor...
method setStatusCategory (line 50) | public static void setStatusCategory(SessionContext ctx, StatusCategor...
method clearStatusCategory (line 55) | public static void clearStatusCategory(SessionContext ctx) {
method getOriginStatusCategory (line 60) | @Nullable
method getOriginStatusCategoryReason (line 65) | @Nullable
method setOriginStatusCategory (line 70) | public static void setOriginStatusCategory(SessionContext ctx, StatusC...
method setOriginStatusCategory (line 74) | public static void setOriginStatusCategory(SessionContext ctx, StatusC...
method clearOriginStatusCategory (line 79) | public static void clearOriginStatusCategory(SessionContext ctx) {
method isResponseHttpErrorStatus (line 84) | public static boolean isResponseHttpErrorStatus(HttpResponseMessage re...
method isResponseHttpErrorStatus (line 93) | public static boolean isResponseHttpErrorStatus(int status) {
method storeStatusCategoryIfNotAlreadyFailure (line 97) | public static void storeStatusCategoryIfNotAlreadyFailure(SessionConte...
FILE: zuul-core/src/main/java/com/netflix/zuul/stats/status/ZuulStatusCategory.java
type ZuulStatusCategory (line 43) | @Immutable
method ZuulStatusCategory (line 82) | ZuulStatusCategory(StatusCategoryGroup group, int index, String reason) {
method getId (line 88) | @Override
method getGroup (line 93) | @Override
method getReason (line 98) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/stats/status/ZuulStatusCategoryGroup.java
type ZuulStatusCategoryGroup (line 27) | @Immutable
method ZuulStatusCategoryGroup (line 34) | ZuulStatusCategoryGroup(int id) {
method getId (line 38) | @Override
FILE: zuul-core/src/main/java/com/netflix/zuul/util/Gzipper.java
class Gzipper (line 34) | public class Gzipper {
method Gzipper (line 38) | public Gzipper() throws RuntimeException {
method write (line 47) | private void write(ByteBuf bb) throws IOException {
method write (line 63) | public void write(HttpContent chunk) {
method finish (line 74) | public void finish() throws RuntimeException {
method getByteBuf (line 84) | public ByteBuf getByteBuf() {
FILE: zuul-core/src/main/java/com/netflix/zuul/util/HttpUtils.java
class HttpUtils (line 38) | public class HttpUtils {
method getClientIP (line 51) | public static String getClientIP(HttpRequestInfo request) {
method extractClientIpFromXForwardedFor (line 68) | public static String extractClientIpFromXForwardedFor(String xForwarde...
method isCompressed (line 81) | @VisibleForTesting
method isCompressed (line 89) | public static boolean isCompressed(Headers headers) {
method acceptsGzip (line 94) | public static boolean acceptsGzip(Headers headers) {
method stripMaliciousHeaderChars (line 105) | public static String stripMaliciousHeaderChars(@Nullable String input) {
method hasNonZeroContentLengthHeader (line 118) | public static boolean hasNonZeroContentLengthHeader(ZuulMessage msg) {
method getContentLengthIfPresent (line 123) | public static Integer getContentLengthIfPresent(ZuulMessage msg) {
method getBodySizeIfKnown (line 136) | public static Integer getBodySizeIfKnown(ZuulMessage msg) {
method hasChunkedTransferEncodingHeader (line 147) | public static boolean hasChunkedTransferEncodingHeader(ZuulMessage msg) {
method getMainChannel (line 160) | public static Channel getMainChannel(ChannelHandlerContext ctx) {
method getMainChannel (line 164) | public static Channel getMainChannel(Channel channel) {
FILE: zuul-core/src/main/java/com/netflix/zuul/util/JsonUtility.java
class JsonUtility (line 27) | public class JsonUtility {
method jsonFromMap (line 45) | public static String jsonFromMap(Map<String, Object> jsonData) {
method stringArrayFromObjectArray (line 88) | private static String stringArrayFromObjectArray(Object data[]) {
class JsonDocument (line 105) | private static class JsonDocument {
method startGroup (line 110) | public JsonDocument startGroup() {
method endGroup (line 116) | public JsonDocument endGroup() {
method addValue (line 121) | public JsonDocument addValue(String key, String value) {
method toString (line 140) | @Override
type JsonCapableObject (line 146) | public static interface JsonCapableObject {
method jsonMap (line 148) | public Map<String, Object> jsonMap();
FILE: zuul-core/src/main/java/com/netflix/zuul/util/ProxyUtils.java
class ProxyUtils (line 32) | public class ProxyUtils {
method isValidRequestHeader (line 55) | public static boolean isValidRequestHeader(HeaderName headerName) {
method isValidResponseHeader (line 59) | public static boolean isValidResponseHeader(HeaderName headerName) {
method addXForwardedHeaders (line 63) | public static void addXForwardedHeaders(HttpRequestMessage request) {
method addXForwardedHeader (line 72) | public static void addXForwardedHeader(Headers headers, HeaderName nam...
FILE: zuul-core/src/main/java/com/netflix/zuul/util/VipUtils.java
class VipUtils (line 19) | public final class VipUtils {
method getVIPPrefix (line 20) | public static String getVIPPrefix(String vipAddress) {
method extractAppNameFromVIP (line 33) | @Deprecated
method extractUntrustedAppNameFromVIP (line 43) | public static String extractUntrustedAppNameFromVIP(String vipAddress) {
method VipUtils (line 53) | private VipUtils() {}
FILE: zuul-core/src/test/java/com/netflix/netty/common/CloseOnIdleStateHandlerTest.java
class CloseOnIdleStateHandlerTest (line 31) | class CloseOnIdleStateHandlerTest {
method setup (line 37) | @BeforeEach
method incrementCounterOnIdleStateEvent (line 42) | @Test
FILE: zuul-core/src/test/java/com/netflix/netty/common/HttpServerLifecycleChannelHandlerTest.java
class HttpServerLifecycleChannelHandlerTest (line 38) | class HttpServerLifecycleChannelHandlerTest {
class AssertReasonHandler (line 40) | final class AssertReasonHandler extends ChannelInboundHandlerAdapter {
method userEventTriggered (line 44) | @Override
method getCompleteEvent (line 50) | public CompleteEvent getCompleteEvent() {
method completionEventReasonIsUpdatedOnPipelineReject (line 55) | @Test
method completionEventReasonIsCloseByDefault (line 71) | @Test
method pipelineRejectReleasesIfNeeded (line 85) | @Test
FILE: zuul-core/src/test/java/com/netflix/netty/common/SourceAddressChannelHandlerTest.java
class SourceAddressChannelHandlerTest (line 37) | class SourceAddressChannelHandlerTest {
method ipv6AddressScopeIdRemoved (line 39) | @Test
method ipv4AddressString (line 50) | @Test
method failsOnUnresolved (line 59) | @Test
method mapsIpv4AddressFromIpv6Address (line 68) | @Test
method ipv6AddressScopeNameRemoved (line 81) | @Test
FILE: zuul-core/src/test/java/com/netflix/netty/common/metrics/InstrumentedResourceLeakDetectorTest.java
class InstrumentedResourceLeakDetectorTest (line 27) | @ExtendWith(MockitoExtension.class)
method setup (line 32) | @BeforeEach
method test (line 37) | @Test
FILE: zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandlerTest.java
class ElbProxyProtocolChannelHandlerTest (line 42) | @ExtendWith(MockitoExtension.class)
method setup (line 47) | @BeforeEach
method noProxy (line 52) | @Test
method extraDataForwarded (line 88) | @Test
method passThrough_ProxyProtocolEnabled_nonProxyBytes (line 111) | @Test
method incrementCounterWhenPPEnabledButNonHAPMMessage (line 148) | @Test
method detectsSplitPpv1Message (line 171) | @Disabled
method tracksSplitMessage (line 198) | @Test
method negotiateProxy_ppv1_ipv4 (line 224) | @Test
method negotiateProxy_ppv1_ipv6 (line 263) | @Test
method negotiateProxy_ppv2_ipv4 (line 299) | @Test
FILE: zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandlerTest.java
class HAProxyMessageChannelHandlerTest (line 35) | class HAProxyMessageChannelHandlerTest {
method setClientDestPortForHAPM (line 37) | @Test
method v2parseCustomTLVs (line 76) | @Test
method validatev2TCPV4NoTLVs (line 162) | @Test
method validateV2TCPV6NoTLVS (line 227) | @Test
FILE: zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/StripUntrustedProxyHeadersHandlerTest.java
class StripUntrustedProxyHeadersHandlerTest (line 53) | @ExtendWith(MockitoExtension.class)
method before (line 71) | @BeforeEach
method allow_never (line 84) | @Test
method allow_always (line 93) | @Test
method allow_mtls_noCert (line 103) | @Test
method allow_mtls_cert (line 112) | @Test
method blacklist_noMatch (line 123) | @Test
method blacklist_match (line 132) | @Test
method blacklist_match_casing (line 141) | @Test
method strip_match (line 150) | @Test
method getHandler (line 160) | private StripUntrustedProxyHeadersHandler getHandler(AllowWhen allowWh...
FILE: zuul-core/src/test/java/com/netflix/netty/common/ssl/ServerSslConfigTest.java
class ServerSslConfigTest (line 26) | class ServerSslConfigTest {
method builderSetsDefaults (line 28) | @Test
method builderSetsAllFields (line 44) | @Test
method getDefaultCiphersReturnsNonEmptyList (line 74) | @Test
FILE: zuul-core/src/test/java/com/netflix/netty/common/throttle/MaxInboundConnectionsHandlerTest.java
class MaxInboundConnectionsHandlerTest (line 32) | class MaxInboundConnectionsHandlerTest {
method setup (line 38) | @BeforeEach
method verifyPassportStateAndAttrs (line 43) | @Test
FILE: zuul-core/src/test/java/com/netflix/zuul/AttrsTest.java
class AttrsTest (line 24) | class AttrsTest {
method keysAreUnique (line 25) | @Test
method newKeyFailsOnNull (line 36) | @Test
method attrsPutFailsOnNull (line 41) | @Test
method attrsPutReplacesOld (line 49) | @Test
method getReturnsNull (line 60) | @Test
method getOrDefault_picksDefault (line 68) | @Test
method getOrDefault_failsOnNullDefault (line 76) | @Test
FILE: zuul-core/src/test/java/com/netflix/zuul/DynamicFilterLoaderTest.java
class DynamicFilterLoaderTest (line 31) | class DynamicFilterLoaderTest {
method before (line 39) | @BeforeEach
method testPutFiltersForClasses (line 46) | @Test
method testPutFiltersForClassesException (line 54) | @Test
method testGetFiltersByType (line 67) | @Test
class TestZuulFilter (line 82) | private static final class TestZuulFilter extends BaseSyncFilter {
method TestZuulFilter (line 84) | TestZuulFilter() {
method filterType (line 88) | @Override
method filterOrder (line 93) | @Override
method shouldFilter (line 98) | @Override
method apply (line 103) | @Override
FILE: zuul-core/src/test/java/com/netflix/zuul/StaticFilterLoaderTest.java
class StaticFilterLoaderTest (line 31) | class StaticFilterLoaderTest {
method getFiltersByType (line 35) | @Test
method getFilterByNameAndType (line 49) | @Test
class DummyFilter1 (line 59) | @Filter(order = 0, type = FilterType.INBOUND)
method filterName (line 62) | @Override
method filterOrder (line 67) | @Override
method shouldFilter (line 72) | @Override
method apply (line 77) | @Override
class DummyFilter2 (line 83) | @Filter(order = 1, type = FilterType.INBOUND)
method filterName (line 86) | @Override
method filterOrder (line 91) | @Override
method shouldFilter (line 96) | @Override
method apply (line 101) | @Override
class DummyFilter22 (line 107) | @Filter(order = 1, type = FilterType.INBOUND)
method filterName (line 110) | @Override
method filterOrder (line 115) | @Override
method shouldFilter (line 120) | @Override
method apply (line 125) | @Override
FILE: zuul-core/src/test/java/com/netflix/zuul/com/netflix/zuul/netty/server/push/PushConnectionTest.java
class PushConnectionTest (line 29) | class PushConnectionTest {
method testOneMessagePerSecond (line 31) | @Test
method testThreeMessagesInSuccession (line 40) | @Test
method testFourMessagesInSuccession (line 48) | @Test
method testFirstThreeMessagesSuccess (line 57) | @Test
method testMessagesInBatches (line 69) | @Test
FILE: zuul-core/src/test/java/com/netflix/zuul/context/DebugTest.java
class DebugTest (line 39) | class DebugTest {
method setup (line 47) | @BeforeEach
method testRequestDebug (line 70) | @Test
method testWriteInboundRequestDebug (line 86) | @Test
method testWriteOutboundRequestDebug (line 100) | @Test
method testWriteRequestDebug_WithBody (line 114) | @Test
method testWriteInboundResponseDebug (line 129) | @Test
method testWriteOutboundResponseDebug (line 143) | @Test
method testWriteResponseDebug_WithBody (line 157) | @Test
method testNoCMEWhenComparingContexts (line 172) | @Test
FILE: zuul-core/src/test/java/com/netflix/zuul/context/SessionContextTest.java
class SessionContextTest (line 25) | @ExtendWith(MockitoExtension.class)
method testBoolean (line 28) | @Test
method keysAreUnique (line 35) | @Test
method newKeyFailsOnNull (line 46) | @Test
method putFailsOnNull (line 51) | @Test
method putReplacesOld (line 59) | @Test
method getReturnsNull (line 70) | @Test
method getOrDefault_picksDefault (line 78) | @Test
method getOrDefault_failsOnNullDefault (line 86) | @Test
method getUsesDefaultValueSupplier (line 95) | @Test
method getOrDefaultUsesDefaultValueSupplier (line 102) | @Test
method getOrDefaultUsesDefaultValueSupplierFailsWithout (line 109) | @Test
method remove (line 116) | @Test
method containsKey (line 129) | @Test
method setInBrownoutModeWithReason (line 143) | @Test
FILE: zuul-core/src/test/java/com/netflix/zuul/filters/BaseFilterTest.java
class BaseFilterTest (line 35) | @ExtendWith(MockitoExtension.class)
method setUpTest (line 40) | @BeforeEach
method validateDefaultConcurrencyLimit (line 45) | @Test
method validateFilterGlobalConcurrencyLimitOverride (line 72) | @Test
method validateFilterSpecificConcurrencyLimitOverride (line 102) | @Test
FILE: zuul-core/src/test/java/com/netflix/zuul/filters/common/GZipResponseFilterTest.java
class GZipResponseFilterTest (line 43) | @ExtendWith(MockitoExtension.class)
method setup (line 57) | @BeforeEach
method prepareResponseBody_NeedsGZipping (line 68) | @Test
method prepareResponseBody_NeedsGZipping_gzipDeflate (line 106) | @Test
method prepareResponseBody_alreadyZipped (line 144) | @Test
method prepareResponseBody_alreadyDeflated (line 156) | @Test
method prepareResponseBody_NeedsGZipping_butTooSmall (line 168) | @Test
method prepareChunkedEncodedResponseBody_NeedsGZipping (line 177) | @Test
FILE: zuul-core/src/test/java/com/netflix/zuul/filters/endpoint/ProxyEndpointTest.java
class ProxyEndpointTest (line 75) | @ExtendWith(MockitoExtension.class)
method setup (line 98) | @BeforeEach
method testRecordProxyRequestEndIsCalledOnce (line 135) | @Test
method testRetryWillResetBodyReader (line 143) | @Test
method retryWhenNoAdjustment (line 161) | @Test
method testRetryAdjustsLimit (line 171) | @Test
method noRetryAdjustmentOnNonRetriableStatusCode (line 180) | @Test
method onErrorFromOriginNoRetryAdjustment (line 189) | @Test
method onErrorFromOriginWithRetryAdjustment (line 198) | @Test
method onErrorFromOriginNoRetryOnNonRetriableError (line 207) | @Test
method lastContentAfterProxyStartedIsConsideredReplayable (line 218) | @Test
method testMassageRequestURIWithEncodedAmpersand (line 261) | @Test
method testMassageRequestURIWithMultipleEncodedParams (line 277) | @Test
method testMassageRequestURIWithNoQueryString (line 292) | @Test
method testMassageRequestURIWithRequestURIContext (line 304) | @Test
method testMassageRequestURIOverrideURITakesPrecedence (line 317) | @Test
method testMassageRequestURIWithNoContextOverride (line 332) | @Test
method validateNoRetry (line 344) | private void validateNoRetry() {
method disableRetriesOnAdjustment (line 353) | private void disableRetriesOnAdjustment() {
method createDiscoveryResult (line 362) | private static DiscoveryResult createDiscoveryResult() {
method createResponse (line 371) | private void createResponse(HttpResponseStatus status) {
method createRequest (line 375) | private HttpRequestMessage createRequest(SessionContext context, Strin...
FILE: zuul-core/src/test/java/com/netflix/zuul/message/HeadersTest.java
class HeadersTest (line 37) | class HeadersTest {
method copyOf (line 39) | @Test
method getFirst_normalizesName (line 51) | @Test
method getFirst_headerName_normalizesName (line 61) | @Test
method getFirst_returnsNull (line 71) | @Test
method getFirst_headerName_returnsNull (line 81) | @Test
method getFirst_returnsDefault (line 91) | @Test
method getFirst_headerName_returnsDefault (line 101) | @Test
method forEachNormalised (line 111) | @Test
method getAll (line 128) | @Test
method getAll_headerName (line 138) | @Test
method setClearsExisting (line 148) | @Test
method setClearsExisting_headerName (line 161) | @Test
method setNullIsEmtpy (line 174) | @Test
method setNullIsEmtpy_headerName (line 187) | @Test
method setIfValidNullIsEmtpy (line 200) | @Test
method setIfValidNullIsEmtpy_headerName (line 213) | @Test
method setIfValidIgnoresInvalidValues (line 226) | @Test
method setIfValidIgnoresInvalidValues_headerName (line 243) | @Test
method setIfValidIgnoresInvalidKey (line 260) | @Test
method setIfValidIgnoresInvalidKey_headerName (line 276) | @Test
method setIfAbsentKeepsExisting (line 292) | @Test
method setIfAbsentKeepsExisting_headerName (line 304) | @Test
method setIfAbsentFailsOnNull (line 316) | @Test
method setIfAbsentFailsOnNull_headerName (line 326) | @Test
method setIfAbsent (line 337) | @Test
method setIfAbsent_headerName (line 349) | @Test
method setIfAbsentAndValid (line 361) | @Test
method setIfAbsentAndValidIgnoresInvalidValues (line 375) | @Test
method add (line 391) | @Test
method add_headerName (line 403) | @Test
method addIfValid (line 415) | @Test
method addIfValid_headerName (line 427) | @Test
method addIfValidIgnoresInvalidValues (line 439) | @Test
method putAll (line 456) | @Test
method remove (line 475) | @Test
method remove_headerName (line 491) | @Test
method removeEmpty (line 507) | @Test
method removeEmpty_headerName (line 523) | @Test
method removeIf (line 539) | @Test
method keySet (line 554) | @Test
method contains (line 574) | @Test
method containsValue (line 598) | @Test
method testCaseInsensitiveKeys_Set (line 614) | @Test
method testCaseInsensitiveKeys_Add (line 625) | @Test
method testCaseInsensitiveKeys_SetIfAbsent (line 637) | @Test
method testCaseInsensitiveKeys_PutAll (line 648) | @Test
method testSanitizeValues_CRLF (line 663) | @Test
method testSanitizeValues_LF (line 673) | @Test
method testSanitizeValues_ISO88591Value (line 683) | @Test
method testSanitizeValues_UTF8Value (line 696) | @Test
method testSanitizeValues_addSetHeaderName (line 716) | @Test
method testSanitizeValues_nameCRLF (line 726) | @Test
FILE: zuul-core/src/test/java/com/netflix/zuul/message/ZuulMessageImplTest.java
class ZuulMessageImplTest (line 32) | @ExtendWith(MockitoExtension.class)
method testClone (line 37) | @Test
method testBufferBody2GetBody (line 59) | @Test
method testBufferBody3GetBody (line 71) | @Test
method testBufferBody3GetBodyAsText (line 84) | @Test
method testSetBodyGetBody (line 97) | @Test
method testSetBodyAsTextGetBody (line 107) | @Test
method testSetBodyAsTextGetBodyAsText (line 119) | @Test
method testMultiSetBodyAsTextGetBody (line 131) | @Test
method testMultiSetBodyGetBody (line 151) | @Test
method testResettingBodyReaderIndex (line 171) | @Test
method testFetchingBodyReturnsEntireBuffer (line 195) | @Test
method testFetchingEmptyBody (line 217) | @Test
FILE: zuul-core/src/test/java/com/netflix/zuul/message/http/CookiesTest.java
class CookiesTest (line 30) | public class CookiesTest {
method getNamesReturnsEmptySetWhenNoCookies (line 32) | @Test
method getNamesReturnsSingleCookieName (line 42) | @Test
method getNamesReturnsMultipleCookieNames (line 53) | @Test
method getNamesReturnsAllUniqueNames (line 68) | @Test
method
Condensed preview — 414 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,884K chars).
[
{
"path": ".github/CODEOWNERS",
"chars": 261,
"preview": "# Default reviewers for Zuul OSS\n* @argha-c @jguerra @gavinbunney @lalernehl @lindseyreynolds @AlexanderEllis @fool1280 "
},
{
"path": ".github/dependabot.yml",
"chars": 206,
"preview": "version: 2\nupdates:\n - package-ecosystem: \"gradle\"\n directory: \"/\"\n schedule:\n interval: \"daily\"\n - package"
},
{
"path": ".github/workflows/benchmark.yml",
"chars": 503,
"preview": "name: benchmark\n\non:\n workflow_dispatch:\n\npermissions:\n contents: read\n\nenv:\n JDK: '21'\n DISTRIBUTION: 'zulu'\n GRAD"
},
{
"path": ".github/workflows/branch_snapshot.yml",
"chars": 1445,
"preview": "name: Branch Snapshot\n\non:\n workflow_dispatch:\n inputs:\n branch:\n description: 'Branch to publish snapsh"
},
{
"path": ".github/workflows/gradle-wrapper-validation.yml",
"chars": 239,
"preview": "name: \"Validate Gradle Wrapper\"\non: [push, pull_request]\n\njobs:\n validation:\n name: \"Gradle wrapper validation\"\n "
},
{
"path": ".github/workflows/pr.yml",
"chars": 744,
"preview": "name: PR Build\n\non: [pull_request]\n\njobs:\n build:\n runs-on: ubuntu-latest\n strategy:\n matrix:\n java: "
},
{
"path": ".github/workflows/release.yml",
"chars": 1645,
"preview": "name: Release\n\non:\n push:\n tags:\n - v[0-9]+.[0-9]+.[0-9]+\n - v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+\n\njobs:\n buil"
},
{
"path": ".github/workflows/snapshot.yml",
"chars": 919,
"preview": "name: Snapshot\n\non:\n push:\n branches:\n - master\n - zuul-v4\n\njobs:\n build:\n runs-on: ubuntu-latest\n "
},
{
"path": ".github/workflows/stale.yml",
"chars": 789,
"preview": "name: 'Close stale issues and PRs'\non:\n schedule:\n - cron: \"*/10 5 * * *\"\n\njobs:\n stale:\n runs-on: ubuntu-latest"
},
{
"path": ".gitignore",
"chars": 905,
"preview": "# Compiled source #\n###################\n*.com\n*.class\n*.dll\n*.exe\n*.o\n*.so\n\n# Packages #\n############\n# it's better to u"
},
{
"path": ".netflixoss",
"chars": 7,
"preview": "jdk=8\n\n"
},
{
"path": "CHANGELOG.md",
"chars": 0,
"preview": ""
},
{
"path": "LICENSE",
"chars": 11349,
"preview": "\n Apache License\n Version 2.0, January 2004\n "
},
{
"path": "OSSMETADATA",
"chars": 20,
"preview": "osslifecycle=active\n"
},
{
"path": "README.md",
"chars": 2413,
"preview": "[](https://github.com/Netflix/zuul/"
},
{
"path": "build.gradle",
"chars": 4753,
"preview": "buildscript {\n dependencies {\n classpath 'com.palantir.javaformat:gradle-palantir-java-format:2.83.0'\n }\n}\n"
},
{
"path": "codequality/checkstyle.xml",
"chars": 7735,
"preview": "<?xml version=\"1.0\"?>\n<!DOCTYPE module PUBLIC\n \"-//Puppy Crawl//DTD Check Configuration 1.2//EN\"\n \"http://www.pupp"
},
{
"path": "gradle/wrapper/gradle-wrapper.properties",
"chars": 252,
"preview": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributi"
},
{
"path": "gradle.properties",
"chars": 239,
"preview": "versions_ribbon=2.4.4\nversions_netty=4.2.10.Final\nversions_brotli4j=1.16.0\nrelease.scope=patch\nrelease.version=3.3.0-SNA"
},
{
"path": "gradlew",
"chars": 8595,
"preview": "#!/bin/sh\n\n#\n# Copyright © 2015 the original authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\")"
},
{
"path": "gradlew.bat",
"chars": 2896,
"preview": "@rem\r\n@rem Copyright 2015 the original author or authors.\r\n@rem\r\n@rem Licensed under the Apache License, Version 2.0 (th"
},
{
"path": "settings.gradle",
"chars": 149,
"preview": "rootProject.name='zuul'\n\ninclude 'zuul-core'\ninclude 'zuul-processor'\ninclude 'zuul-sample'\ninclude 'zuul-discovery'\ninc"
},
{
"path": "zuul-core/build.gradle",
"chars": 3632,
"preview": "apply plugin: \"com.google.osdetector\"\napply plugin: \"java-library\"\n\ndependencies {\n\n compileOnly libraries.lombok\n "
},
{
"path": "zuul-core/src/jmh/java/com/netflix/zuul/message/HeadersBenchmark.java",
"chars": 5402,
"preview": "/*\n * Copyright 2020 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/config/DynamicIntegerSetProperty.java",
"chars": 1458,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/config/PatternListStringProperty.java",
"chars": 1901,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/AbstrHttpConnectionExpiryHandler.java",
"chars": 4041,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/ByteBufUtil.java",
"chars": 1957,
"preview": "/*\n * Copyright 2022 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/CategorizedThreadFactory.java",
"chars": 1248,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/CloseOnIdleStateHandler.java",
"chars": 1508,
"preview": "/**\n * Copyright 2018 Netflix, Inc.\n * <p>\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may no"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/ConnectionCloseChannelAttributes.java",
"chars": 1973,
"preview": "/*\n * Copyright 2019 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/ConnectionCloseType.java",
"chars": 1354,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/Http1ConnectionCloseHandler.java",
"chars": 6186,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/Http1ConnectionExpiryHandler.java",
"chars": 1210,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/Http2ConnectionCloseHandler.java",
"chars": 10089,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/Http2ConnectionExpiryHandler.java",
"chars": 1402,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/HttpChannelFlags.java",
"chars": 1878,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/HttpClientLifecycleChannelHandler.java",
"chars": 3779,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/HttpLifecycleChannelHandler.java",
"chars": 6131,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/HttpRequestReadTimeoutEvent.java",
"chars": 972,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/HttpRequestReadTimeoutHandler.java",
"chars": 4589,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/HttpServerLifecycleChannelHandler.java",
"chars": 4941,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/RequestResponseCompleteEvent.java",
"chars": 795,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/SourceAddressChannelHandler.java",
"chars": 7604,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/SslExceptionsHandler.java",
"chars": 2094,
"preview": "/*\n * Copyright 2023 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/SwallowSomeHttp2ExceptionsHandler.java",
"chars": 2664,
"preview": "/*\n * Copyright 2019 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/accesslog/AccessLogChannelHandler.java",
"chars": 5745,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/accesslog/AccessLogPublisher.java",
"chars": 5776,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/channel/config/ChannelConfig.java",
"chars": 2059,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/channel/config/ChannelConfigKey.java",
"chars": 1457,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/channel/config/ChannelConfigValue.java",
"chars": 1116,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/channel/config/CommonChannelConfigKeys.java",
"chars": 5069,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/http2/DynamicHttp2FrameLogger.java",
"chars": 9138,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/metrics/EventLoopGroupMetrics.java",
"chars": 2764,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/metrics/EventLoopMetrics.java",
"chars": 2607,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/metrics/Http2MetricsChannelHandlers.java",
"chars": 5778,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/metrics/HttpBodySizeRecordingChannelHandler.java",
"chars": 4962,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/metrics/HttpMetricsChannelHandler.java",
"chars": 4102,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/metrics/InstrumentedResourceLeakDetector.java",
"chars": 2703,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/metrics/PerEventLoopMetricsChannelHandler.java",
"chars": 3140,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandler.java",
"chars": 3383,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandler.java",
"chars": 7291,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/StripUntrustedProxyHeadersHandler.java",
"chars": 4188,
"preview": "/*\n * Copyright 2020 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/ssl/ServerSslConfig.java",
"chars": 6035,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/ssl/SslHandshakeInfo.java",
"chars": 5872,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/status/ServerStatusManager.java",
"chars": 1317,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/throttle/MaxInboundConnectionsHandler.java",
"chars": 3585,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/throttle/RejectionType.java",
"chars": 1529,
"preview": "/*\n * Copyright 2020 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/throttle/RejectionUtils.java",
"chars": 14978,
"preview": "/*\n * Copyright 2020 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/netty/common/throttle/RequestRejectedEvent.java",
"chars": 1570,
"preview": "/*\n * Copyright 2020 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/Attrs.java",
"chars": 3860,
"preview": "/*\n * Copyright 2020 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/BasicFilterUsageNotifier.java",
"chars": 1470,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/BasicRequestCompleteHandler.java",
"chars": 1521,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/DefaultFilterFactory.java",
"chars": 1477,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/DynamicFilterLoader.java",
"chars": 4963,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/ExecutionStatus.java",
"chars": 786,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/Filter.java",
"chars": 3531,
"preview": "/*\n * Copyright 2020 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/FilterCategory.java",
"chars": 2146,
"preview": "/*\n * Copyright 2022 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/FilterConstraint.java",
"chars": 1229,
"preview": "/*\n * Copyright 2026 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/FilterFactory.java",
"chars": 1097,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/FilterFileManager.java",
"chars": 2207,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/FilterLoader.java",
"chars": 2337,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/FilterUsageNotifier.java",
"chars": 972,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/RequestCompleteHandler.java",
"chars": 905,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/StaticFilterLoader.java",
"chars": 6566,
"preview": "/*\n * Copyright 2020 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/ZuulApplicationInfo.java",
"chars": 1301,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/constants/ZuulConstants.java",
"chars": 4861,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/constants/ZuulHeaders.java",
"chars": 2232,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/context/CommonContextKeys.java",
"chars": 4639,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/context/Debug.java",
"chars": 7612,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/context/SessionCleaner.java",
"chars": 863,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/context/SessionContext.java",
"chars": 15736,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/context/SessionContextDecorator.java",
"chars": 850,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/context/SessionContextFactory.java",
"chars": 962,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/context/ZuulSessionContextDecorator.java",
"chars": 3143,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/exception/ErrorType.java",
"chars": 2366,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/exception/OutboundErrorType.java",
"chars": 4020,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/exception/OutboundException.java",
"chars": 2029,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/exception/RequestExpiredException.java",
"chars": 906,
"preview": "/*\n * Copyright 2023 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/exception/ZuulException.java",
"chars": 2672,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/exception/ZuulFilterConcurrencyExceededException.java",
"chars": 955,
"preview": "/**\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/filters/BaseFilter.java",
"chars": 5626,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/filters/BaseSyncFilter.java",
"chars": 1416,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/filters/Endpoint.java",
"chars": 1335,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/filters/FilterError.java",
"chars": 1685,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/filters/FilterRegistry.java",
"chars": 1755,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/filters/FilterSyncType.java",
"chars": 792,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/filters/FilterType.java",
"chars": 1483,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/filters/MutableFilterRegistry.java",
"chars": 1879,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/filters/ShouldFilter.java",
"chars": 1097,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/filters/SyncZuulFilter.java",
"chars": 926,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/filters/SyncZuulFilterAdapter.java",
"chars": 3217,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/filters/ZuulFilter.java",
"chars": 4819,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/filters/common/GZipResponseFilter.java",
"chars": 6098,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/filters/common/SurgicalDebugFilter.java",
"chars": 3564,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/EndpointLifecycle.java",
"chars": 1433,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/MissingEndpointHandlingFilter.java",
"chars": 2243,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java",
"chars": 48642,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/filters/http/HttpInboundFilter.java",
"chars": 1095,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/filters/http/HttpInboundSyncFilter.java",
"chars": 1107,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/filters/http/HttpOutboundFilter.java",
"chars": 1220,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/filters/http/HttpOutboundSyncFilter.java",
"chars": 1112,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/filters/http/HttpSyncEndpoint.java",
"chars": 3955,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/filters/passport/InboundPassportStampingFilter.java",
"chars": 1248,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/filters/passport/OutboundPassportStampingFilter.java",
"chars": 1254,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/filters/passport/PassportStampingFilter.java",
"chars": 1581,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/logging/Http2FrameLoggingPerClientIpHandler.java",
"chars": 1892,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/message/Header.java",
"chars": 1955,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/message/HeaderName.java",
"chars": 2145,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/message/Headers.java",
"chars": 24527,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/message/ZuulMessage.java",
"chars": 5266,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/message/ZuulMessageImpl.java",
"chars": 7839,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/message/http/Cookies.java",
"chars": 1936,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/message/http/HttpHeaderNames.java",
"chars": 5932,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/message/http/HttpHeaderNamesCache.java",
"chars": 2053,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/message/http/HttpQueryParams.java",
"chars": 7345,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/message/http/HttpRequestInfo.java",
"chars": 2134,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/message/http/HttpRequestMessage.java",
"chars": 1212,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/message/http/HttpRequestMessageImpl.java",
"chars": 21752,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/message/http/HttpResponseInfo.java",
"chars": 1195,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/message/http/HttpResponseMessage.java",
"chars": 1436,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/message/http/HttpResponseMessageImpl.java",
"chars": 8785,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/message/util/HttpRequestBuilder.java",
"chars": 3743,
"preview": "/*\n * Copyright 2021 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/metrics/OriginStats.java",
"chars": 872,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/metrics/OriginStatsFactory.java",
"chars": 833,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnCounter.java",
"chars": 5860,
"preview": "/*\n * Copyright 2020 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnTimer.java",
"chars": 5184,
"preview": "/*\n * Copyright 2020 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/monitoring/MonitoringHelper.java",
"chars": 1308,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/monitoring/Tracer.java",
"chars": 1012,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/monitoring/TracerFactory.java",
"chars": 1477,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/ChannelUtils.java",
"chars": 1553,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/NettyRequestAttemptFactory.java",
"chars": 3650,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/RequestCancelledEvent.java",
"chars": 786,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/SpectatorUtils.java",
"chars": 2444,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/BasicRequestStat.java",
"chars": 2414,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ClientChannelManager.java",
"chars": 1762,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ClientTimeoutHandler.java",
"chars": 3111,
"preview": "/*\n * Copyright 2019 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ConnectionPoolConfig.java",
"chars": 1718,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ConnectionPoolConfigImpl.java",
"chars": 5755,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ConnectionPoolHandler.java",
"chars": 6791,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ConnectionPoolMetrics.java",
"chars": 5874,
"preview": "/*\n * Copyright 2025 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java",
"chars": 17938,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultOriginChannelInitializer.java",
"chars": 5161,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/IConnectionPool.java",
"chars": 1446,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/NettyClientConnectionFactory.java",
"chars": 3308,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/OriginChannelInitializer.java",
"chars": 1091,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/OriginConnectException.java",
"chars": 1534,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java",
"chars": 18397,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PooledConnection.java",
"chars": 7070,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PooledConnectionFactory.java",
"chars": 872,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/RequestStat.java",
"chars": 1653,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ZuulNettyExceptionMapper.java",
"chars": 794,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/filter/BaseZuulFilterRunner.java",
"chars": 24193,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/filter/EventExecutorScheduler.java",
"chars": 2648,
"preview": "/*\n * Copyright 2025 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/filter/FilterConstraints.java",
"chars": 2736,
"preview": "/*\n * Copyright 2026 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/filter/FilterRunner.java",
"chars": 979,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/filter/ZuulEndPointRunner.java",
"chars": 10528,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/filter/ZuulFilterChainHandler.java",
"chars": 8380,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/filter/ZuulFilterChainRunner.java",
"chars": 7527,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/insights/PassportLoggingHandler.java",
"chars": 7258,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/insights/PassportStateHttpClientHandler.java",
"chars": 3671,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/insights/PassportStateHttpServerHandler.java",
"chars": 4638,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/insights/PassportStateListener.java",
"chars": 2027,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/insights/PassportStateOriginHandler.java",
"chars": 3717,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/insights/ServerStateHandler.java",
"chars": 5373,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/ratelimiting/NullChannelHandlerProvider.java",
"chars": 961,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java",
"chars": 19687,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java",
"chars": 20129,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientConnectionsShutdown.java",
"chars": 6500,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java",
"chars": 24154,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientResponseWriter.java",
"chars": 14135,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/server/DefaultEventLoopConfig.java",
"chars": 1918,
"preview": "/**\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/server/DirectMemoryMonitor.java",
"chars": 3098,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/server/EventLoopConfig.java",
"chars": 861,
"preview": "/**\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/server/Http1MutualSslChannelInitializer.java",
"chars": 3434,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/server/ListenerSpec.java",
"chars": 1778,
"preview": "/*\n * Copyright 2024 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/server/MethodBinding.java",
"chars": 1645,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/server/NamedSocketAddress.java",
"chars": 1988,
"preview": "/*\n * Copyright 2021 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/server/OriginResponseReceiver.java",
"chars": 13550,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java",
"chars": 22818,
"preview": "/*\n * Copyright 2018 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
}
]
// ... and 214 more files (download for full content)
About this extraction
This page contains the full source code of the Netflix/zuul GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 414 files (1.7 MB), approximately 394.4k tokens, and a symbol index with 3110 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.