title: Netty and multiple handlers
body: <p>How to do the following with netty:</p>
  
  <ol>
  <li>if uri starts "/static/*" path use StaticHttpHandler</li>
  <li>if other uri uses HttpHandler</li>
  <li>if "/ws" use WebSocketHandler</li>
  </ol>
  
  <p>Now I have this code:</p>
  
  <pre><code>public class HttpHelloWorldServerInitializer extends ChannelInitializer&lt;SocketChannel&gt; {
      @Override
      public void initChannel(SocketChannel ch) {
          ChannelPipeline p = ch.pipeline();
          p.addLast(new HttpServerCodec());
          p.addLast(new HttpHandler());
  
          // Other pipelene handlers?
      }
  }
  </code></pre>
  
  <p>Can I use something like "swither" in pipeline? Or it doesn't make sense and I need to handle request uri inside handler. But how to determine websocket protocol?</p>