Package io.vertx.mutiny.ext.web.handler
Class TemplateHandler
java.lang.Object
io.vertx.mutiny.ext.web.handler.TemplateHandler
- All Implemented Interfaces:
MutinyDelegate
,io.vertx.core.Handler<RoutingContext>
,Consumer<RoutingContext>
public class TemplateHandler
extends Object
implements MutinyDelegate, 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 Summary
FieldsModifier and TypeFieldDescriptionstatic final TypeArg<TemplateHandler>
static final String
The default content type header to be used in the responsestatic final String
The default index pagestatic final String
The default directory where templates will be looked for -
Constructor Summary
ConstructorsConstructorDescriptionTemplateHandler
(io.vertx.ext.web.handler.TemplateHandler delegate) TemplateHandler
(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(RoutingContext item) static TemplateHandler
create
(TemplateEngine engine) static TemplateHandler
create
(TemplateEngine engine, String templateDirectory, String contentType) boolean
io.vertx.ext.web.handler.TemplateHandler
void
handle
(RoutingContext arg0) int
hashCode()
static TemplateHandler
newInstance
(io.vertx.ext.web.handler.TemplateHandler arg) setIndexTemplate
(String indexTemplate) toString()
-
Field Details
-
__TYPE_ARG
-
DEFAULT_TEMPLATE_DIRECTORY
The default directory where templates will be looked for- See Also:
-
DEFAULT_CONTENT_TYPE
The default content type header to be used in the response- See Also:
-
DEFAULT_INDEX_TEMPLATE
The default index page- See Also:
-
-
Constructor Details
-
TemplateHandler
public TemplateHandler(io.vertx.ext.web.handler.TemplateHandler delegate) -
TemplateHandler
-
-
Method Details
-
getDelegate
public io.vertx.ext.web.handler.TemplateHandler getDelegate()- Specified by:
getDelegate
in interfaceMutinyDelegate
- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
handle
- Specified by:
handle
in interfaceio.vertx.core.Handler<RoutingContext>
-
setIndexTemplate
- Parameters:
indexTemplate
- the index template- Returns:
- a reference to this, so the API can be used fluently
-
create
- 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
- Specified by:
accept
in interfaceConsumer<RoutingContext>
-
newInstance
-