jooby/src/main/java/org/jooby/Deferred.java
@Nonnull
  public static Deferred deferred(final String executor, final Route.ZeroArgHandler handler) {
    return deferred(executor, req -> handler.handle());
  }
@Nonnull
  public static Deferred deferred(final String executor, final Route.ZeroArgHandler handler) {
    return deferred(executor, req -> handler.handle());
  }
Functional version of {@link Deferred#Deferred(Initializer)}. To use ideally with one
or more {@link Executor}:

<pre>{@code
{
executor("cached", Executors.newCachedExecutor());

get("/fork", deferred("cached", () -> {
return "OK";
}));
}
}</pre>

This handler automatically {@link Deferred#resolve(Object)} or
{@link Deferred#reject(Throwable)} a route handler response.

@param executor Executor to run the deferred.
@param handler Application block.
@return A new deferred handler.