playframework/playframework — pull request #3121 by richdougherty (2014-07-02 00:09:41+00:00)
Title: Refactor server code in preparation for akka-http backend

Moved the main method out of `NettyServer` and into a new class called `ServerStart`. Refactored the existing server start logic so it is easier to understand. Added tests for server start logic.

Consolidated server configuration into a single class, `ServerConfig`. This configuration class will be used by both the Netty and akka-http server backends.

Created an abstraction for a VM process so that server creation can be tested properly. This trait, `ServerProcess`, provides alternative methods to call instead of calling `System.getProperties`, `System.exit`, etc.

Made it possible to start servers other than `NettyServer`, by providing a system property called `server.class`. This feaure is only exercised in unit tests for now.

Also split out some of the smaller classes that were previously in `NettyServer.scala` into oher files.