/**
 * Copyright 2011-2014 the original author or authors.
 */
package com.jetdrone.vertx.yoke;

import org.vertx.java.core.AsyncResult;
import org.vertx.java.core.Handler;
import org.vertx.java.core.Vertx;
import org.vertx.java.core.buffer.Buffer;

import java.util.Map;

/**
 * # Engine
 *
 * Engine represents a Template Engine that can be registered with Yoke. Any template engine just needs to implement
 * this template. The class provides access to the Vertx object so the engine might do I/O operations in the context of
 * the module.
 */
public interface Engine {

    /**
     * Called on register to allow using vertx in the engine.
     *
     * @param vertx Vertx instance
     */
    void setVertx(Vertx vertx);

    /**
     * Returns the default content type for this template, e.g.: `text/html`.
     *
     * @return the content type
     */
    String contentType();

    /**
     * Returns the default content encoding for this template, e.g.: `UTF-8`.
     *
     * @return content encoding
     */
    String contentEncoding();

    /**
     * The implementation of the render engine. The implementation should render the given file with the context in an
     * asynchronous way.
     *
     * @param filename String representing the file path to the template
     * @param context  Map with key values that might get substituted in the template
     * @param handler  The future result handler with a Buffer in case of success
     */
    void render(final String filename, final Map<String, Object> context, final Handler<AsyncResult<Buffer>> handler);
}

@@ -1572,10 +1572,717 @@
 ndler);%0A
+    %0A    /**%0A     * The implementation of the render engine with layout support. The implementation should render both the main template and the layout template with the context in an%0A     * asynchronous way.%0A     *%0A     * @param filename String representing the file path to the template%0A     * @param layoutFilename String representing the file path to the layout template%0A     * @param context  Map with key values that might get substituted in the template%0A     * @param handler  The future result handler with a Buffer in case of success%0A     */    %0A    void render(final String filename, final String layoutFilename, final Map%3CString, Object%3E context, final Handler%3CAsyncResult%3CBuffer%3E%3E handler);    %0A
 %7D%0A

Update Engine.java