title: dynamically changing netty pipeline
body: <p>I am using netty 4.0.25Final to write a netty HTTP server. I need to add various handlers in the pipeline depending upon some parameters in HTTP GET request. </p>
  
  <pre><code>pipeline.addLast(new HttpRequestDecoder(4096, 8192, 8192, false),
                   new HttpResponseEncoder(),
                   new HttpObjectAggregator(1048576),
                   decisionHandler
                   );
  </code></pre>
  
  <p>Same pipeline is used if multiple requests come from the same connection. Request1 may need Handler1, Request2 may need Handler2 and Request3 may need Handler3. Suppose requests are coming as Request1, Request2, Request3. Request1 would modify the pipeline to add Handler1. </p>
  
  <ol>
  <li><p>In subsequent calls do we always need to check if the pipleline is already modified, then remove the unwanted handlers? And then add the required handlers which are needed to handler that particular call?</p></li>
  <li><p>Or should I remove the handler before going to the next handler (fireChannelRead(object))? Will it have performance impact?</p></li>
  <li><p>Is there any other way to do this?</p></li>
  </ol>
  
  <p>Thanks &amp; Regards,</p>
  
  <p>Tanima</p>