玩框架入口点

时间:2011-09-06 19:33:57

标签: java playframework entry-point

当我从浏览器发送请求播放时!在localhost:9000上,PlayFramework中的哪个对象/方法首先开始处理我对服务器的请求?

我知道PlayFramework使用netty框架来处理请求。那么也许一些netty方法开始执行?

1 个答案:

答案 0 :(得分:4)

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.