Package: io.vertx.groovy.ext.web.handler

## [Groovy] Class TemplateHandler

- io.vertx.groovy.ext.web.handler.TemplateHandler

- All Implemented Interfaces and Traits:
    io.vertx.core.Handler

      @groovy.transform.CompileStatic
      class TemplateHandler
      extends java.lang.Object

  A handler which renders responses using a template engine and where the template name is selected from the URI path.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `TemplateHandler (java.lang.Object delegate)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `static TemplateHandler` | `create(TemplateEngine engine)` Create a handler
    `static TemplateHandler` | `create(TemplateEngine engine, java.lang.String templateDirectory, java.lang.String contentType)` Create a handler
    `java.lang.Object` | `getDelegate()`
    `void` | `handle(RoutingContext arg0)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Constructor Detail

    - #### TemplateHandler(java.lang.Object delegate)

  - ### Method Detail

    - #### static TemplateHandler create(TemplateEngine engine)

      Create a handler

      Returns:
        the handler
      Parameters:
        `engine` - the template engine

    - #### static TemplateHandler create(TemplateEngine engine, java.lang.String templateDirectory, java.lang.String contentType)

      Create a handler

      Returns:
        the handler
      Parameters:
        `engine` - the template engine
        `templateDirectory` - the template directory where templates will be looked for
        `contentType` - the content type header to be used in the response

    - #### java.lang.Object getDelegate()

    - #### void handle(RoutingContext arg0)