Unfiltered 0.2.2
Server Interfaces
- The
serverfield in prior versions ofunfiltered.jetty.Server(the wrapper's reference to the Jetty server object) is nowunderlying. - The
destroymethod of the underlying Jetty server is now promoted to the wrapper interface, and it is called from therunmethod. Destroying completed server instances frees PermGen space for long-running JVM sessions, such as those provided by interactive build and test tools. - The
runmethod is not guaranteed to return. If you have code to execute after the server is stopped, call run with beforeStart and afterStop functions. - Convenience methods on unfiltered.jetty.Http: local for a server bound to the loopback interface only, and anylocal for a server on loopback using any available port.
New Modules
- unfiltered-websockets: Uses Netty. Details are available in the readme.
- unfiltered-utils: basic functions used by other unfiltered modules.
- unfiltered-netty-server: extracts servers from unfiltered-netty module, so that they may be used without depending on unfiltered-library.
Unfiltered Library
Support for Cookies.
ResponseFunction and Intent
ResponseFunction now takes a type parameter A to restrict the type of
its underlying instance. The type A of all general ResponseFunctions
in unfiltered library is Any, as they do not require any specific
implementation.
The intent convention has evolved to encompass underlying response types, specifically the Cycle.Intent type takes two parameters, A for the underlying request and B for the response. This allows the use of narrowly typed ResponseFunctions to be checked when defining a particular intent.
Finally, the implementation of intent pattern matching has been
improved. The method isDefinedAt is employed rather than
optimistically attempting a match inside a try/catch block, all known
side effects produced by request extractors have been eliminated. This
required a slight change to the interface used to access multipart
data in unfiltered-uploads.
Netty
The unfiltered-netty module now supplies two Plan constructs. unfiltered.netty.cycle.Plan is for defining a traditional request-response cycle, where a response object is synchronously produced for a request. unfiltered.netty.channel.Plan does not assume any response strategy; it simply matches the request and leaves it to the application to construct and write a response through Netty.
Unfiltered is a toolkit for responding to HTTP requests in Scala.
