Interface NamedNode
- All Superinterfaces:
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 Summary
Modifier and TypeMethodDescriptiondefault booleanacceptDebugger(Exchange exchange) Whether this node can accept debugging the current exchange.default @Nullable NamedNodeSpecial methods for Choice EIPdefault @Nullable NamedNodeSpecial methods for Choice EIPReturns the direct children of this node in the route model tree.@Nullable StringReturns the description text or null if there is no description text associated with this nodegetId()Gets the value of the id property.getLabel()Returns a label to describe this node such as the expression if some kind of expression nodedefault intgetLevel()Processor Level in the route tree@Nullable StringGets the node prefix id.@Nullable NamedNodeReturns the parentdefault @Nullable StringReturns a short name for this node which can be useful for ID generation or referring to related resources like imagesdefault booleanReturns whether a custom id has been assigned (vs auto-generated by Camel).Methods inherited from interface LineNumberAware
getLineNumber, getLocation, setLineNumber, setLocation
-
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
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
-
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 nots and therefore invisible toinvalid reference
org.apache.camel.model.ProcessorDefinitiongetOutputs()). -
hasCustomIdAssigned
default boolean hasCustomIdAssigned()Returns whether a custom id has been assigned (vs auto-generated by Camel).- Since:
- 4.21
-
findMatchingWhen
-
findMatchingOtherwise
-