Interface NamedNode

All Superinterfaces:
LineNumberAware

public interface NamedNode extends LineNumberAware
Represents an identifiable node in the Camel route model.

The route model (in the org.apache.camel.model package) is the abstract syntax tree built by the DSL before routes are started. Every model element — from the route itself down to individual EIP steps such as .filter(), .choice(), and .to() — implements NamedNode so that it can be located by id, referenced in logs and management output, and traversed by tooling (debuggers, tracers, visualizers).

The getId() is auto-generated when not explicitly set, and the optional getNodePrefixId() is used when routes share a common id prefix to avoid collisions in composite applications.

See Also:
  • Method Details

    • getId

      String getId()
      Gets the value of the id property.
    • getNodePrefixId

      @Nullable String getNodePrefixId()
      Gets the node prefix id.
    • getShortName

      String getShortName()
      Returns a short name for this node which can be useful for ID generation or referring to related resources like images
      Returns:
      defaults to "node" but derived nodes should overload this to provide a unique name
    • getLabel

      String getLabel()
      Returns a label to describe this node such as the expression if some kind of expression node
    • getDescriptionText

      @Nullable String getDescriptionText()
      Returns the description text or null if there is no description text associated with this node
    • getParent

      @Nullable NamedNode getParent()
      Returns the parent
    • acceptDebugger

      default boolean acceptDebugger(Exchange exchange)
      Whether this node can accept debugging the current exchange. This allows flexibility for some EIPs that need to compute whether to accept debugging or not
      Parameters:
      exchange - the current exchange
      Returns:
      true to accept debugging this node, or false to skip
    • getLevel

      default int getLevel()
      Processor Level in the route tree
    • getParentId

      default @Nullable String getParentId()
    • getChildren

      default List<NamedNode> getChildren()
      Returns the direct children of this node in the route model tree. This provides a uniform API for tree walkers to traverse the full model structure without needing to special-case EIPs like Choice (whose when/otherwise children are not
      invalid reference
      org.apache.camel.model.ProcessorDefinition
      s and therefore invisible to getOutputs()).
    • hasCustomIdAssigned

      default boolean hasCustomIdAssigned()
      Returns whether a custom id has been assigned (vs auto-generated by Camel).
      Since:
      4.21
    • findMatchingWhen

      default @Nullable NamedNode findMatchingWhen(String id)
      Special methods for Choice EIP
    • findMatchingOtherwise

      default @Nullable NamedNode findMatchingOtherwise(String id)
      Special methods for Choice EIP