Package io.vertx.mutiny.ext.web.handler
Class TemplateHandler
- java.lang.Object
 - 
- io.vertx.mutiny.ext.web.handler.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 theoriginalnon Mutiny-ified interface using Vert.x codegen. 
- 
- 
Field Summary
Fields Modifier and Type Field Description static TypeArg<TemplateHandler>__TYPE_ARGstatic StringDEFAULT_CONTENT_TYPEThe default content type header to be used in the responsestatic StringDEFAULT_INDEX_TEMPLATEThe default index pagestatic StringDEFAULT_TEMPLATE_DIRECTORYThe default directory where templates will be looked for 
- 
Constructor Summary
Constructors Constructor Description TemplateHandler(io.vertx.ext.web.handler.TemplateHandler delegate)TemplateHandler(Object delegate) 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(RoutingContext item)static TemplateHandlercreate(TemplateEngine engine)static TemplateHandlercreate(TemplateEngine engine, String templateDirectory, String contentType)booleanequals(Object o)io.vertx.ext.web.handler.TemplateHandlergetDelegate()voidhandle(RoutingContext arg0)inthashCode()static TemplateHandlernewInstance(io.vertx.ext.web.handler.TemplateHandler arg)TemplateHandlersetIndexTemplate(String indexTemplate)StringtoString() 
 - 
 
- 
- 
Field Detail
- 
__TYPE_ARG
public static final 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(io.vertx.ext.web.handler.TemplateHandler delegate)
 
- 
TemplateHandler
public TemplateHandler(Object delegate)
 
 - 
 
- 
Method Detail
- 
getDelegate
public io.vertx.ext.web.handler.TemplateHandler getDelegate()
 
- 
handle
public void handle(RoutingContext arg0)
- Specified by:
 handlein interfaceio.vertx.core.Handler<RoutingContext>
 
- 
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)
- Parameters:
 engine- the template engine- Returns:
 - the handler
 
 
- 
create
public static TemplateHandler create(TemplateEngine engine, String templateDirectory, String contentType)
- Parameters:
 engine- the template enginetemplateDirectory- the template directory where templates will be looked forcontentType- the content type header to be used in the response- Returns:
 - the handler
 
 
- 
accept
public void accept(RoutingContext item)
- Specified by:
 acceptin interfaceConsumer<RoutingContext>
 
- 
newInstance
public static TemplateHandler newInstance(io.vertx.ext.web.handler.TemplateHandler arg)
 
 - 
 
 -