final Engine renderEngine = engines.get(extension);
if (renderEngine == null) {
next.handle("No engine registered for extension: " + extension);
} else {
renderEngine.render(template, context, new AsyncResultHandler<Buffer>() {
@Override
public void handle(AsyncResult<Buffer> asyncResult) {
if (asyncResult.failed()) {
next.handle(asyncResult.cause());
} else {