public class TemplateHandler extends Object implements Handler<RoutingContext>
original
non RX-ified interface using Vert.x codegen.Modifier and Type | Field and 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 and Description |
---|
TemplateHandler(Object delegate) |
TemplateHandler(TemplateHandler delegate) |
Modifier and Type | Method and 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() |
public static final io.vertx.lang.rx.TypeArg<TemplateHandler> __TYPE_ARG
public static final String DEFAULT_TEMPLATE_DIRECTORY
public static final String DEFAULT_CONTENT_TYPE
public static final String DEFAULT_INDEX_TEMPLATE
public TemplateHandler(TemplateHandler delegate)
public TemplateHandler(Object delegate)
public TemplateHandler getDelegate()
public void handle(RoutingContext event)
handle
in interface Handler<RoutingContext>
event
- the event to handlepublic TemplateHandler setIndexTemplate(String indexTemplate)
indexTemplate
- the index templatepublic static TemplateHandler create(TemplateEngine engine)
engine
- the template enginepublic static TemplateHandler create(TemplateEngine engine, String templateDirectory, String contentType)
engine
- the template enginetemplateDirectory
- the template directory where templates will be looked forcontentType
- the content type header to be used in the responsepublic static TemplateHandler newInstance(TemplateHandler arg)
Copyright © 2022 Eclipse. All rights reserved.