public class TemplateEngine extends Object
Concrete implementations exist for several well-known template engines.
NOTE: This class has been automatically generated from theoriginal
non RX-ified interface using Vert.x codegen.Modifier and Type | Field and Description |
---|---|
static TypeArg<TemplateEngine> |
__TYPE_ARG |
Constructor and Description |
---|
TemplateEngine(TemplateEngine delegate) |
Modifier and Type | Method and Description |
---|---|
TemplateEngine |
getDelegate() |
boolean |
isCachingEnabled()
Returns true if the template engine caches template files.
|
static TemplateEngine |
newInstance(TemplateEngine arg) |
void |
render(RoutingContext context,
String templateFileName,
Handler<AsyncResult<Buffer>> handler)
Render the template
|
void |
render(RoutingContext context,
String templateDirectory,
String templateFileName,
Handler<AsyncResult<Buffer>> handler)
Render the template
|
Observable<Buffer> |
renderObservable(RoutingContext context,
String templateFileName)
Deprecated.
|
Observable<Buffer> |
renderObservable(RoutingContext context,
String templateDirectory,
String templateFileName)
Deprecated.
|
Single<Buffer> |
rxRender(RoutingContext context,
String templateFileName)
Render the template
|
Single<Buffer> |
rxRender(RoutingContext context,
String templateDirectory,
String templateFileName)
Render the template
|
public static final TypeArg<TemplateEngine> __TYPE_ARG
public TemplateEngine(TemplateEngine delegate)
public TemplateEngine getDelegate()
public void render(RoutingContext context, String templateFileName, Handler<AsyncResult<Buffer>> handler)
context
- the routing contexttemplateFileName
- the template file name to usehandler
- the handler that will be called with a result containing the buffer or a failure.@Deprecated public Observable<Buffer> renderObservable(RoutingContext context, String templateFileName)
rxRender(io.vertx.rxjava.ext.web.RoutingContext, java.lang.String)
insteadcontext
- the routing contexttemplateFileName
- the template file name to usepublic Single<Buffer> rxRender(RoutingContext context, String templateFileName)
context
- the routing contexttemplateFileName
- the template file name to usepublic void render(RoutingContext context, String templateDirectory, String templateFileName, Handler<AsyncResult<Buffer>> handler)
NOTE if you call method directly (i.e. not using TemplateHandler
) make sure
that templateFileName is sanitized via io.vertx.rxjava.ext.web.impl.Utils#normalizePath
context
- the routing contexttemplateDirectory
- the template directory to usetemplateFileName
- the relative template file name to usehandler
- the handler that will be called with a result containing the buffer or a failure.@Deprecated public Observable<Buffer> renderObservable(RoutingContext context, String templateDirectory, String templateFileName)
rxRender(io.vertx.rxjava.ext.web.RoutingContext, java.lang.String)
instead
NOTE if you call method directly (i.e. not using TemplateHandler
) make sure
that templateFileName is sanitized via io.vertx.rxjava.ext.web.impl.Utils#normalizePath
context
- the routing contexttemplateDirectory
- the template directory to usetemplateFileName
- the relative template file name to usepublic Single<Buffer> rxRender(RoutingContext context, String templateDirectory, String templateFileName)
NOTE if you call method directly (i.e. not using TemplateHandler
) make sure
that templateFileName is sanitized via io.vertx.rxjava.ext.web.impl.Utils#normalizePath
context
- the routing contexttemplateDirectory
- the template directory to usetemplateFileName
- the relative template file name to usepublic boolean isCachingEnabled()
public static TemplateEngine newInstance(TemplateEngine arg)
Copyright © 2017. All rights reserved.