pedestal/pedestal — pull request #276 by arohner (2014-08-20 20:58:50+00:00)
Title: Add NIO support in pedestal responses

Early draft of NIO support.

Conceptually, this just extends WriteableBody to java.nio.channels.ReadableByteChannel, but nothing is ever that easy.

- refactored the code about (channel? (:body response)) into a protocol, WriteBodyAsync
- there are two implementations for WriteBodyAsync, core.async channels, and nio.ReadableByteChannel
- NIO is not yet part of the servlet standard, so this adds a new protocol, WriteBodyByteChannel, which dispatches on the class of the servlet response.
- adds jetty implementation of WriteBodyByteChannel

TODO
- tests. I haven't found any functional tests in the repo. Is it a goal to only write unit tests? My first inclination is to just stand up a jetty server and run some http responses through it.