Class TemplateHandler
java.lang.Object
io.vertx.rxjava3.ext.web.handler.TemplateHandler
- All Implemented Interfaces:
Handler<RoutingContext>, io.vertx.lang.rx.RxDelegate
public class TemplateHandler
extends Object
implements io.vertx.lang.rx.RxDelegate, 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
FieldsModifier and TypeFieldDescriptionstatic final io.vertx.lang.rx.TypeArg<TemplateHandler> static final StringThe default content type header to be used in the responsestatic final StringThe default index pagestatic final StringThe default directory where templates will be looked for -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TemplateHandlercreate(TemplateEngine engine) Create a handlerstatic TemplateHandlercreate(TemplateEngine engine, String templateDirectory, String contentType) Create a handlerbooleanvoidhandle(RoutingContext event) Something has happened, so handle it.inthashCode()static TemplateHandlersetIndexTemplate(String indexTemplate) Set the index templatetoString()
-
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
-
-
Constructor Details
-
TemplateHandler
-
TemplateHandler
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getDelegate
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
handle
Something has happened, so handle it.- Specified by:
handlein interfaceHandler<RoutingContext>- Parameters:
event- the event to handle
-
setIndexTemplate
Set the index template- Parameters:
indexTemplate- the index template- Returns:
- a reference to this, so the API can be used fluently
-
create
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 enginetemplateDirectory- the template directory where templates will be looked forcontentType- the content type header to be used in the response- Returns:
- the handler
-
newInstance
-