public final String process(final String template, final IContext context) { return process(new TemplateSpec(template, null, null, null,null), context); }
final String template = templateSpec.getTemplate(); final Set<String> templateSelectors = templateSpec.getTemplateSelectors(); final TemplateMode templateMode = templateSpec.getTemplateMode(); final Map<String, Object> templateResolutionAttributes = templateSpec.getTemplateResolutionAttributes(); if (templateSpec.isOutputSSE()) { throttledTemplateWriter = new SSEThrottledTemplateWriter(template, flowController); } else {
new Object[]{ TemplateEngine.threadIndex(), LoggingUtils.loggifyTemplateName(templateSpec.getTemplate()), context.getLocale(), elapsed, elapsedMs, templateSpec, context.getLocale(), elapsed, elapsedMs}); throw new TemplateProcessingException("Exception preparing throttled template", templateSpec.toString(), e);
final String template = templateSpec.getTemplate(); final Set<String> templateSelectors = templateSpec.getTemplateSelectors(); final TemplateMode templateMode = templateSpec.getTemplateMode(); final Map<String, Object> templateResolutionAttributes = templateSpec.getTemplateResolutionAttributes();
new Object[]{ TemplateEngine.threadIndex(), LoggingUtils.loggifyTemplateName(templateSpec.getTemplate()), context.getLocale(), elapsed, elapsedMs, templateSpec, context.getLocale(), elapsed, elapsedMs}); writer.flush(); } catch (final IOException e) { throw new TemplateOutputException("An error happened while flushing output writer", templateSpec.getTemplate(), -1, -1, e); throw new TemplateProcessingException("Exception processing template", templateSpec.toString(), e);
public final void process(final String template, final IContext context, final Writer writer) { process(new TemplateSpec(template, null, null, null,null), context, writer); }
this.writer.flush(); } catch (final IOException e) { throw new TemplateOutputException("An error happened while flushing output writer", templateSpec.getTemplate(), -1, -1, e); new Object[]{ TemplateEngine.threadIndex(), LoggingUtils.loggifyTemplateName(this.templateSpec.getTemplate()), this.context.getLocale(), elapsed, elapsedMs, this.templateSpec, this.context.getLocale(), Integer.valueOf(maxOutput), outputType, Integer.valueOf(writtenCount), outputType, elapsed, elapsedMs}); throw new TemplateProcessingException("Exception processing throttled template", this.templateSpec.toString(), e);
public final IThrottledTemplateProcessor processThrottled(final String template, final IContext context) { return processThrottled(new TemplateSpec(template, null, null, null, null), context); }
public final IThrottledTemplateProcessor processThrottled(final String template, final Set<String> templateSelectors, final IContext context) { return processThrottled(new TemplateSpec(template, templateSelectors, null, null, null), context); }
public final String process(final String template, final Set<String> templateSelectors, final IContext context) { return process(new TemplateSpec(template, templateSelectors, null, null,null), context); }
public final void process(final String template, final Set<String> templateSelectors, final IContext context, final Writer writer) { process(new TemplateSpec(template, templateSelectors, null, null,null), context, writer); }
final String outputContentType = sse? "text/event-stream" : null; final TemplateSpec templateSpec = new TemplateSpec(templateName, markupSelectors, outputContentType, null); return new StreamThrottledTemplateProcessor( processThrottled(templateSpec, wrappedContext), dataDrivenIterator, sseEventsPrefix, sseEventsID, sse);