Reactive servlets

Hookless » Adapters » Servlets

Reactive servlet as implemented in ReactiveServlet class is a reactive adapter for Java EE's HttpServlet. Reactive servlet is a reactive consumer. It will keep running its handler method until the handler no longer reactively blocks. It will then send the last output of the handler to the client as an HTTP response. Reactive servlet is fully asynchronous. It never blocks servlet container's threads.

Download

Get Hookless Servlets from Maven Central:

Tool
<dependency>
    <groupId>com.machinezoo.hookless</groupId>
    <artifactId>hookless-servlets</artifactId>
    <version>0.4.0</version>
</dependency>

Or clone sources from GitHub or Bitbucket. Configure your build for Java 8+. Reactive servlets target servlet API 3.1, which means they will run on any Java EE 7+ servlet container. Sources and binaries are distributed under Apache License 2.0.

Documentation

See the javadoc, particularly the ReactiveServlet class. Since the javadoc is not complete yet, you might want to take a look at comments and implementation in sources.