Class TemplateHandler

  • All Implemented Interfaces:
    io.vertx.core.Handler<RoutingContext>, Consumer<RoutingContext>

    public class TemplateHandler
    extends Object
    implements io.vertx.core.Handler<RoutingContext>, Consumer<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 Mutiny-ified interface using Vert.x codegen.

    • Field Detail

      • 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
    • Constructor Detail

      • TemplateHandler

        public TemplateHandler​(io.vertx.ext.web.handler.TemplateHandler delegate)
      • TemplateHandler

        public TemplateHandler​(Object delegate)
    • Method Detail

      • getDelegate

        public io.vertx.ext.web.handler.TemplateHandler getDelegate()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • setIndexTemplate

        public TemplateHandler setIndexTemplate​(String indexTemplate)
        Parameters:
        indexTemplate - the index template
        Returns:
        a reference to this, so the API can be used fluently
      • create

        public static TemplateHandler create​(TemplateEngine engine,
                                             String templateDirectory,
                                             String contentType)
        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​(io.vertx.ext.web.handler.TemplateHandler arg)