Play框架入口点

3
当我从浏览器发送一个请求到 localhost:9000 上的 Play! 时,PlayFramework 中哪个对象/方法首先开始处理我的请求到服务器?
我知道PlayFramework 使用 netty 框架来处理请求。那么也许一些 netty 方法开始执行?
1个回答

5
play.server.Server.main(...)
  new Server(...)
    bootstrap.setPipelineFactory(new HttpServerPipelineFactory());
      pipeline.addLast("handler", playHandler); [PlayHandler instance is injected to 'netty' factory ]
        messageReceived(final ChannelHandlerContext ctx, final MessageEvent e) of PlayHandler will be called-back from netty when a new http message received.

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接