Package org.thymeleaf.engine
Class ProcessorTemplateHandler
- java.lang.Object
-
- org.thymeleaf.engine.ProcessorTemplateHandler
-
- All Implemented Interfaces:
ITemplateHandler
public final class ProcessorTemplateHandler extends java.lang.Object implements ITemplateHandler
Basic, most fundamental processor in the chain of
ITemplateHandlers applied to a template for processing it.This handler actually executes all applicable
IProcessors to each of the template events, resulting in the processing of the template.All pre-processors apply before this handler, and all post-processors apply afterwards.
- Since:
- 3.0.0
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ProcessorTemplateHandler()Creates a new instance of this handler.
-
Method Summary
-
-
-
Field Detail
-
logger
private static final org.slf4j.Logger logger
-
EMPTY_TEMPLATE_BOUNDARIES_PROCESSORS
private static final ITemplateBoundariesProcessor[] EMPTY_TEMPLATE_BOUNDARIES_PROCESSORS
-
EMPTY_CDATA_SECTION_PROCESSORS
private static final ICDATASectionProcessor[] EMPTY_CDATA_SECTION_PROCESSORS
-
EMPTY_COMMENT_PROCESSORS
private static final ICommentProcessor[] EMPTY_COMMENT_PROCESSORS
-
EMPTY_DOCTYPE_PROCESSORS
private static final IDocTypeProcessor[] EMPTY_DOCTYPE_PROCESSORS
-
EMPTY_PROCESSING_INSTRUCTION_PROCESSORS
private static final IProcessingInstructionProcessor[] EMPTY_PROCESSING_INSTRUCTION_PROCESSORS
-
EMPTY_TEXT_PROCESSORS
private static final ITextProcessor[] EMPTY_TEXT_PROCESSORS
-
EMPTY_XML_DECLARATION_PROCESSORS
private static final IXMLDeclarationProcessor[] EMPTY_XML_DECLARATION_PROCESSORS
-
elementTagStructureHandler
private final ElementTagStructureHandler elementTagStructureHandler
-
elementModelStructureHandler
private final ElementModelStructureHandler elementModelStructureHandler
-
templateBoundariesStructureHandler
private final TemplateBoundariesStructureHandler templateBoundariesStructureHandler
-
cdataSectionStructureHandler
private final CDATASectionStructureHandler cdataSectionStructureHandler
-
commentStructureHandler
private final CommentStructureHandler commentStructureHandler
-
docTypeStructureHandler
private final DocTypeStructureHandler docTypeStructureHandler
-
processingInstructionStructureHandler
private final ProcessingInstructionStructureHandler processingInstructionStructureHandler
-
textStructureHandler
private final TextStructureHandler textStructureHandler
-
xmlDeclarationStructureHandler
private final XMLDeclarationStructureHandler xmlDeclarationStructureHandler
-
next
private ITemplateHandler next
-
configuration
private IEngineConfiguration configuration
-
attributeDefinitions
private AttributeDefinitions attributeDefinitions
-
templateMode
private TemplateMode templateMode
-
context
private ITemplateContext context
-
engineContext
private IEngineContext engineContext
-
flowController
private TemplateFlowController flowController
-
templateBoundariesProcessors
private ITemplateBoundariesProcessor[] templateBoundariesProcessors
-
cdataSectionProcessors
private ICDATASectionProcessor[] cdataSectionProcessors
-
commentProcessors
private ICommentProcessor[] commentProcessors
-
docTypeProcessors
private IDocTypeProcessor[] docTypeProcessors
-
processingInstructionProcessors
private IProcessingInstructionProcessor[] processingInstructionProcessors
-
textProcessors
private ITextProcessor[] textProcessors
-
xmlDeclarationProcessors
private IXMLDeclarationProcessor[] xmlDeclarationProcessors
-
initialContextLevel
private java.lang.Integer initialContextLevel
-
modelController
private TemplateModelController modelController
-
currentGatheringModel
private IGatheringModelProcessable currentGatheringModel
-
throttleEngine
private boolean throttleEngine
-
pendingProcessings
private IEngineProcessable[] pendingProcessings
-
pendingProcessingsSize
private int pendingProcessingsSize
-
decreaseContextLevelProcessable
private DecreaseContextLevelProcessable decreaseContextLevelProcessable
-
-
Method Detail
-
setNext
public void setNext(ITemplateHandler next)
- Specified by:
setNextin interfaceITemplateHandler
-
setContext
public void setContext(ITemplateContext context)
- Specified by:
setContextin interfaceITemplateHandler
-
setFlowController
public void setFlowController(TemplateFlowController flowController)
-
handleTemplateStart
public void handleTemplateStart(ITemplateStart itemplateStart)
- Specified by:
handleTemplateStartin interfaceITemplateHandler
-
handleTemplateEnd
public void handleTemplateEnd(ITemplateEnd itemplateEnd)
- Specified by:
handleTemplateEndin interfaceITemplateHandler
-
performTearDownChecks
void performTearDownChecks(ITemplateEnd itemplateEnd)
-
handleText
public void handleText(IText itext)
- Specified by:
handleTextin interfaceITemplateHandler
-
handleComment
public void handleComment(IComment icomment)
- Specified by:
handleCommentin interfaceITemplateHandler
-
handleCDATASection
public void handleCDATASection(ICDATASection icdataSection)
- Specified by:
handleCDATASectionin interfaceITemplateHandler
-
handleStandaloneElement
public void handleStandaloneElement(IStandaloneElementTag istandaloneElementTag)
- Specified by:
handleStandaloneElementin interfaceITemplateHandler
-
handleOpenElement
public void handleOpenElement(IOpenElementTag iopenElementTag)
- Specified by:
handleOpenElementin interfaceITemplateHandler
-
handleCloseElement
public void handleCloseElement(ICloseElementTag icloseElementTag)
- Specified by:
handleCloseElementin interfaceITemplateHandler
-
handleUnmatchedCloseElement
private void handleUnmatchedCloseElement(ICloseElementTag icloseElementTag)
-
handleDocType
public void handleDocType(IDocType idocType)
- Specified by:
handleDocTypein interfaceITemplateHandler
-
handleXMLDeclaration
public void handleXMLDeclaration(IXMLDeclaration ixmlDeclaration)
- Specified by:
handleXMLDeclarationin interfaceITemplateHandler
-
handleProcessingInstruction
public void handleProcessingInstruction(IProcessingInstruction iprocessingInstruction)
- Specified by:
handleProcessingInstructionin interfaceITemplateHandler
-
handlePending
public void handlePending()
Handle any processing that might have been left pending during its execution because of the process having been stopped during throttling.
This method is only for internal use, and will be called by the
IThrottledTemplateProcessorimplementations before actually letting any new events flow in from the parser or cache.
-
ensurePendingCapacity
private void ensurePendingCapacity()
-
queueProcessable
private void queueProcessable(IEngineProcessable processableModel)
-
queueEvent
private void queueEvent(ITemplateEvent event)
-
obtainCurrentGatheringModel
private IGatheringModelProcessable obtainCurrentGatheringModel()
-
setCurrentGatheringModel
void setCurrentGatheringModel(IGatheringModelProcessable gatheringModel)
-
-