@Test void shouldInitializeChannelPipelineWithExpectedHandlers() { List<String> expected = Arrays.asList( "LoggingHandler#0", "http-client-codec", "gzip-encoder", "http-object-aggregator", "write-timeout-handler", "mantis-event-aggregator", "idle-channel-handler", "event-channel-handler", "DefaultChannelPipeline$TailContext#0"); initializer.initChannel(channel); Assertions.assertTrue(expected.containsAll(channel.pipeline().names())); }
@Override protected void initChannel(Channel ch) { ChannelPipeline pipeline = ch.pipeline(); pipeline.addLast( new LoggingHandler()); pipeline.addLast("http-client-codec", new HttpClientCodec()); if (gzipEnabled) { pipeline.addLast(encoderEventLoopGroup, "gzip-encoder", new GzipEncoder(registry)); } pipeline.addLast("http-object-aggregator", new HttpObjectAggregator(httpChunkSize)); pipeline.addLast("write-timeout-handler", new WriteTimeoutHandler(writeTimeoutSeconds)); pipeline.addLast("mantis-event-aggregator", new MantisEventAggregator( registry, Clock.systemUTC(), gzipEnabled, flushIntervalMs, flushIntervalBytes)); pipeline.addLast("idle-channel-handler", new IdleStateHandler(0, idleTimeoutSeconds, 0)); pipeline.addLast("event-channel-handler", new HttpEventChannelHandler(registry)); LOG.debug("initializing channel with pipeline: {}", pipeline.toMap()); }
HttpEventChannelInitializer extends ChannelInitializer<Channel> { @Override protected void initChannel(Channel ch) { ChannelPipeline pipeline = ch.pipeline(); pipeline.addLast( new LoggingHandler()); pipeline.addLast("http-client-codec", new HttpClientCodec()); if (gzipEnabled) { pipeline.addLast(encoderEventLoopGroup, "gzip-encoder", new GzipEncoder(registry)); } pipeline.addLast("http-object-aggregator", new HttpObjectAggregator(httpChunkSize)); pipeline.addLast("write-timeout-handler", new WriteTimeoutHandler(writeTimeoutSeconds)); pipeline.addLast("mantis-event-aggregator", new MantisEventAggregator( registry, Clock.systemUTC(), gzipEnabled, flushIntervalMs, flushIntervalBytes)); pipeline.addLast("idle-channel-handler", new IdleStateHandler(0, idleTimeoutSeconds, 0)); pipeline.addLast("event-channel-handler", new HttpEventChannelHandler(registry)); LOG.debug("initializing channel with pipeline: {}", pipeline.toMap()); } }
HttpEventChannelInitializer extends ChannelInitializer<Channel> { @Override protected void initChannel(Channel ch) { ChannelPipeline pipeline = ch.pipeline(); pipeline.addLast( new LoggingHandler()); pipeline.addLast("http-client-codec", new HttpClientCodec()); if (gzipEnabled) { pipeline.addLast(encoderEventLoopGroup, "gzip-encoder", new GzipEncoder(registry)); } pipeline.addLast("http-object-aggregator", new HttpObjectAggregator(httpChunkSize)); pipeline.addLast("write-timeout-handler", new WriteTimeoutHandler(writeTimeoutSeconds)); pipeline.addLast("mantis-event-aggregator", new MantisEventAggregator( registry, Clock.systemUTC(), gzipEnabled, flushIntervalMs, flushIntervalBytes)); pipeline.addLast("idle-channel-handler", new IdleStateHandler(0, idleTimeoutSeconds, 0)); pipeline.addLast("event-channel-handler", new HttpEventChannelHandler(registry)); LOG.debug("initializing channel with pipeline: {}", pipeline.toMap()); } HttpEventChannelInitializer(
            Registry registry,
            MrePublishConfiguration config,
            EventLoopGroup encoderEventLoopGroup); }
HttpEventChannelInitializer extends ChannelInitializer<Channel> { @Override protected void initChannel(Channel ch) { ChannelPipeline pipeline = ch.pipeline(); pipeline.addLast( new LoggingHandler()); pipeline.addLast("http-client-codec", new HttpClientCodec()); if (gzipEnabled) { pipeline.addLast(encoderEventLoopGroup, "gzip-encoder", new GzipEncoder(registry)); } pipeline.addLast("http-object-aggregator", new HttpObjectAggregator(httpChunkSize)); pipeline.addLast("write-timeout-handler", new WriteTimeoutHandler(writeTimeoutSeconds)); pipeline.addLast("mantis-event-aggregator", new MantisEventAggregator( registry, Clock.systemUTC(), gzipEnabled, flushIntervalMs, flushIntervalBytes)); pipeline.addLast("idle-channel-handler", new IdleStateHandler(0, idleTimeoutSeconds, 0)); pipeline.addLast("event-channel-handler", new HttpEventChannelHandler(registry)); LOG.debug("initializing channel with pipeline: {}", pipeline.toMap()); } HttpEventChannelInitializer(
            Registry registry,
            MrePublishConfiguration config,
            EventLoopGroup encoderEventLoopGroup);  }
HttpEventChannelInitializer extends ChannelInitializer<Channel> { @Override protected void initChannel(Channel ch) { ChannelPipeline pipeline = ch.pipeline(); pipeline.addLast( new LoggingHandler()); pipeline.addLast("http-client-codec", new HttpClientCodec()); if (gzipEnabled) { pipeline.addLast(encoderEventLoopGroup, "gzip-encoder", new GzipEncoder(registry)); } pipeline.addLast("http-object-aggregator", new HttpObjectAggregator(httpChunkSize)); pipeline.addLast("write-timeout-handler", new WriteTimeoutHandler(writeTimeoutSeconds)); pipeline.addLast("mantis-event-aggregator", new MantisEventAggregator( registry, Clock.systemUTC(), gzipEnabled, flushIntervalMs, flushIntervalBytes)); pipeline.addLast("idle-channel-handler", new IdleStateHandler(0, idleTimeoutSeconds, 0)); pipeline.addLast("event-channel-handler", new HttpEventChannelHandler(registry)); LOG.debug("initializing channel with pipeline: {}", pipeline.toMap()); } HttpEventChannelInitializer(
            Registry registry,
            MrePublishConfiguration config,
            EventLoopGroup encoderEventLoopGroup);   }