Class ResolveEvent

java.lang.Object
io.quarkus.qute.trace.BaseEvent
io.quarkus.qute.trace.ResolveEvent

public final class ResolveEvent extends BaseEvent
Represents an event fired during the resolution of a template node.

This event encapsulates information about the node currently being resolved, the resolution context, and the engine managing the rendering process.

It also holds the result of the resolution as a ResultNode and any Throwable error that may have occurred during resolution. These fields can be set by the code handling the event.

Used by trace listeners to monitor or inspect the evaluation of template nodes.

  • Constructor Details

    • ResolveEvent

      public ResolveEvent(TemplateNode templateNode, ResolutionContext context, Engine engine)
      Creates a new ResolveEvent for the given template node, resolution context, and engine.
      Parameters:
      templateNode - the template node being resolved
      context - the current resolution context
      engine - the engine managing the rendering
  • Method Details

    • getTemplateNode

      public TemplateNode getTemplateNode()
      Returns the template node currently being resolved.
      Returns:
      the template node
    • getContext

      public ResolutionContext getContext()
      Returns the current resolution context.
      Returns:
      the resolution context
    • getResultNode

      public ResultNode getResultNode()
      Returns the result of resolving the template node.

      May be null if the resolution has not yet been performed or if an error occurred.

      Returns:
      the result node or null
    • getError

      public Throwable getError()
      Returns the error thrown during resolution, if any.

      May be null if no error occurred.

      Returns:
      the error or null
    • resolve

      public void resolve(ResultNode resultNode, Throwable error)
      Sets the result of resolving the template node along with any error.
      Parameters:
      resultNode - the resolved result, or null if resolution failed
      error - the error thrown during resolution, or null if none