Package io.vertx.rxjava3.ext.web.handler

## Class TemplateHandler

- java.lang.Object
- - io.vertx.rxjava3.ext.web.handler.TemplateHandler

- All Implemented Interfaces:
    `Handler<RoutingContext>`

      public class TemplateHandler
      extends Object
      implements Handler<RoutingContext>

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

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static io.vertx.lang.rx.TypeArg<TemplateHandler>` | `__TYPE_ARG` |
    `static String` | `DEFAULT_CONTENT_TYPE` | The default content type header to be used in the response
    `static String` | `DEFAULT_INDEX_TEMPLATE` | The default index page
    `static String` | `DEFAULT_TEMPLATE_DIRECTORY` | The default directory where templates will be looked for

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `TemplateHandler​(TemplateHandler delegate)` |
    `TemplateHandler​(Object delegate)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static TemplateHandler` | `create​(TemplateEngine engine)` | Create a handler
    `static TemplateHandler` | `create​(TemplateEngine engine, String templateDirectory, String contentType)` | Create a handler
    `boolean` | `equals​(Object o)` |
    `TemplateHandler` | `getDelegate()` |
    `void` | `handle​(RoutingContext event)` | Something has happened, so handle it.
    `int` | `hashCode()` |
    `static TemplateHandler` | `newInstance​(TemplateHandler arg)` |
    `TemplateHandler` | `setIndexTemplate​(String indexTemplate)` | Set the index template
    `String` | `toString()` |

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<TemplateHandler> __TYPE_ARG

    - #### DEFAULT_TEMPLATE_DIRECTORY

          public static final String DEFAULT_TEMPLATE_DIRECTORY

      The default directory where templates will be looked for
      See Also:
        Constant Field Values

    - #### DEFAULT_CONTENT_TYPE

          public static final String DEFAULT_CONTENT_TYPE

      The default content type header to be used in the response
      See Also:
        Constant Field Values

    - #### DEFAULT_INDEX_TEMPLATE

          public static final String DEFAULT_INDEX_TEMPLATE

      The default index page
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### TemplateHandler

          public TemplateHandler​(TemplateHandler delegate)

    - #### TemplateHandler

          public TemplateHandler​(Object delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals​(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getDelegate

          public TemplateHandler getDelegate()

    - #### handle

          public void handle​(RoutingContext event)

      Something has happened, so handle it.
      Specified by:
        `handle` in interface `Handler<RoutingContext>`
      Parameters:
        `event` - the event to handle

    - #### setIndexTemplate

          public TemplateHandler setIndexTemplate​(String indexTemplate)

      Set the index template
      Parameters:
        `indexTemplate` - the index template
      Returns:
        a reference to this, so the API can be used fluently

    - #### create

          public static TemplateHandler create​(TemplateEngine engine)

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

    - #### create

          public static TemplateHandler create​(TemplateEngine engine,
                                               String templateDirectory,
                                               String contentType)

      Create a 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
      Returns:
        the handler

    - #### newInstance

          public static TemplateHandler newInstance​(TemplateHandler arg)