O'Reilly logo

Mastering Play Framework for Scala by Shiti Saxena

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The request-response life cycle

The Play Framework uses Netty by default, so requests are received by NettyServer.

Netty allows a variety of actions including custom coding through handlers. We can define a handler that transforms a request into a desired response and provides it to Netty when bootstrapping the application. To integrate a Play app with Netty, PlayDefaultUpstreamHandler is used.

Note

For additional information on requests used in Netty, refer to Netty docs at http://netty.io/wiki/user-guide-for-4.x.html and Netty ChannelPipeline docs at http://netty.io/4.0/api/io/netty/channel/ChannelPipeline.html.

PlayDefaultUpstreamHandler extends org.jboss.netty.channel.SimpleChannelUpstreamHandler to handle both HTTP and WebSocket requests. It ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required