public class FreeMarkerTemplateEngineImpl extends CachingTemplateEngine<freemarker.template.Template> implements FreeMarkerTemplateEngine
cache, extensionDEFAULT_MAX_CACHE_SIZE, DEFAULT_TEMPLATE_EXTENSION| Constructor and Description |
|---|
FreeMarkerTemplateEngineImpl(Vertx vertx) |
| Modifier and Type | Method and Description |
|---|---|
void |
render(Map<String,Object> context,
String templateFile,
Handler<AsyncResult<Buffer>> handler)
Render the template.
|
FreeMarkerTemplateEngine |
setExtension(String extension) |
FreeMarkerTemplateEngine |
setMaxCacheSize(int maxCacheSize)
Set the max cache size for the engine
|
adjustLocation, doSetExtension, isCachingEnabledclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateisCachingEnabled, renderpublic FreeMarkerTemplateEngineImpl(Vertx vertx)
public FreeMarkerTemplateEngine setExtension(String extension)
setExtension in interface FreeMarkerTemplateEngineextension - the extensionpublic FreeMarkerTemplateEngine setMaxCacheSize(int maxCacheSize)
FreeMarkerTemplateEnginesetMaxCacheSize in interface FreeMarkerTemplateEnginemaxCacheSize - the maxCacheSizepublic void render(Map<String,Object> context, String templateFile, Handler<AsyncResult<Buffer>> handler)
TemplateEnginerender in interface TemplateEnginecontext - the routing contexttemplateFile - the template file name to usehandler - the handler that will be called with a result containing the buffer or a failure.Copyright © 2020. All rights reserved.