@@ -0,0 +1,1135 @@
+package com.tacitknowledge.performance;%0A%0Aimport java.util.List;%0A%0Aimport com.tacitknowledge.performance.metrics.MetricsHandler;%0Aimport com.tacitknowledge.performance.scenario.ScenarioSelector;%0A%0Aimport io.netty.channel.ChannelInitializer;%0Aimport io.netty.channel.socket.SocketChannel;%0A%0A/** @author Ivan Frolov (ifrolov@tacitknowledge.com) */%0Apublic class ScenarioChannellInitializer extends ChannelInitializer%3CSocketChannel%3E%0A%7B%0A    private final List%3CScenario%3E scenarios;%0A    private final ScenarioSelector scenarioSelector;%0A%0A    public ScenarioChannellInitializer(final List%3CScenario%3E scenarios, final ScenarioSelector scenarioSelector)%0A    %7B%0A        this.scenarios = scenarios;%0A        this.scenarioSelector = scenarioSelector;%0A    %7D%0A%0A    @Override%0A    protected void initChannel(final SocketChannel ch) throws Exception%0A    %7B%0A        Scenario scenario = scenarioSelector.select(scenarios);%0A        ch.config().setKeepAlive(false);%0A        ch.pipeline().addFirst(new MetricsHandler(scenario.getMetrics()));%0A        for (Component component : scenario.getComponents())%0A        %7B%0A            component.initChannel(ch);%0A        %7D%0A    %7D%0A%0A%7D%0A

Implement channel initializer.