protected void addHttpRelatedHandlers(ChannelPipeline pipeline) { pipeline.addLast(new PassportStateHttpServerHandler()); if (httpRequestReadTimeout > -1) { HttpRequestReadTimeoutHandler.addLast(pipeline, httpRequestReadTimeout, TimeUnit.MILLISECONDS, httpRequestReadTimeoutCounter); } pipeline.addLast(new HttpServerLifecycleChannelHandler()); pipeline.addLast(new HttpBodySizeRecordingChannelHandler()); pipeline.addLast(httpMetricsHandler); pipeline.addLast(perEventLoopRequestsMetricsHandler); if (accessLogPublisher != null) { pipeline.addLast(new AccessLogChannelHandler(accessLogPublisher)); } pipeline.addLast(serverStatusHeaderHandler); //pipeline.addLast(requestThrottleHandler); pipeline.addLast(stripInboundProxyHeadersHandler); if (rateLimitingChannelHandler != null) { pipeline.addLast(rateLimitingChannelHandler); } //pipeline.addLast(requestRejectedChannelHandler); }
private static State getOrCreateCurrentState(Channel ch) { State state = ch.attr(ATTR_STATE).get(); if (state == null) { state = createNewState(ch); } return state; }
ctx.set(CommonContextKeys.REQ_BODY_SIZE_PROVIDER, HttpBodySizeRecordingChannelHandler.getCurrentRequestBodySize(channel)); ctx.set(CommonContextKeys.RESP_BODY_SIZE_PROVIDER, HttpBodySizeRecordingChannelHandler.getCurrentResponseBodySize(channel));
ctx.set(CommonContextKeys.REQ_BODY_SIZE_PROVIDER, HttpBodySizeRecordingChannelHandler.getCurrentRequestBodySize(channel)); ctx.set(CommonContextKeys.RESP_BODY_SIZE_PROVIDER, HttpBodySizeRecordingChannelHandler.getCurrentResponseBodySize(channel));
ctx.set(CommonContextKeys.REQ_BODY_SIZE_PROVIDER, HttpBodySizeRecordingChannelHandler.getCurrentRequestBodySize(channel)); ctx.set(CommonContextKeys.RESP_BODY_SIZE_PROVIDER, HttpBodySizeRecordingChannelHandler.getCurrentResponseBodySize(channel));
private static State getOrCreateCurrentState(Channel ch) { State state = ch.attr(ATTR_STATE).get(); if (state == null) { state = createNewState(ch); } return state; }
protected void addHttpRelatedHandlers(ChannelPipeline pipeline) { pipeline.addLast(new PassportStateHttpServerHandler()); if (httpRequestReadTimeout > -1) { HttpRequestReadTimeoutHandler.addLast(pipeline, httpRequestReadTimeout, TimeUnit.MILLISECONDS, httpRequestReadTimeoutCounter); } pipeline.addLast(new HttpServerLifecycleChannelHandler()); pipeline.addLast(new HttpBodySizeRecordingChannelHandler()); pipeline.addLast(httpMetricsHandler); pipeline.addLast(perEventLoopRequestsMetricsHandler); if (accessLogPublisher != null) { pipeline.addLast(new AccessLogChannelHandler(accessLogPublisher)); } pipeline.addLast(serverStatusHeaderHandler); //pipeline.addLast(requestThrottleHandler); pipeline.addLast(stripInboundProxyHeadersHandler); if (rateLimitingChannelHandler != null) { pipeline.addLast(rateLimitingChannelHandler); } //pipeline.addLast(requestRejectedChannelHandler); }
private static State getOrCreateCurrentState(Channel ch) { State state = ch.attr(ATTR_STATE).get(); if (state == null) { state = createNewState(ch); } return state; }
protected void addHttpRelatedHandlers(ChannelPipeline pipeline) { pipeline.addLast(new PassportStateHttpServerHandler()); if (httpRequestReadTimeout > -1) { HttpRequestReadTimeoutHandler.addLast(pipeline, httpRequestReadTimeout, TimeUnit.MILLISECONDS, httpRequestReadTimeoutCounter); } pipeline.addLast(new HttpServerLifecycleChannelHandler()); pipeline.addLast(new HttpBodySizeRecordingChannelHandler()); pipeline.addLast(httpMetricsHandler); pipeline.addLast(perEventLoopRequestsMetricsHandler); if (accessLogPublisher != null) { pipeline.addLast(new AccessLogChannelHandler(accessLogPublisher)); } pipeline.addLast(serverStatusHeaderHandler); //pipeline.addLast(requestThrottleHandler); pipeline.addLast(stripInboundProxyHeadersHandler); if (rateLimitingChannelHandler != null) { pipeline.addLast(rateLimitingChannelHandler); } //pipeline.addLast(requestRejectedChannelHandler); }