当我从浏览器发送请求播放时!在localhost:9000
上,PlayFramework
中的哪个对象/方法首先开始处理我对服务器的请求?
我知道PlayFramework
使用netty
框架来处理请求。那么也许一些netty方法开始执行?
答案 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.