Package org.apache.camel.builder
Class AdviceWithBuilder<T extends ProcessorDefinition<?>>
java.lang.Object
org.apache.camel.builder.AdviceWithBuilder<T>
A builder when using the advice with feature.
- See Also:
-
Constructor Summary
ConstructorDescriptionAdviceWithBuilder
(AdviceWithRouteBuilder builder, String id, String toString, String toUri, Class<T> type) -
Method Summary
Modifier and TypeMethodDescriptionafter()
Insert the following node(s) after the matched node(s)before()
Insert the following node(s) before the matched node(s)maxDeep
(int maxDeep) Will only apply for nodes maximum levels deep.void
remove()
Removes the matched node(s)replace()
Replaces the matched node(s) with the following nodes.Will only apply the first node matched.selectIndex
(int index) Will only apply the n'th node matched.Will only apply the last node matched.selectRange
(int from, int to) Will only apply the node in the index range matched.
-
Constructor Details
-
AdviceWithBuilder
-
-
Method Details
-
selectFirst
Will only apply the first node matched.- Returns:
- the builder to build the nodes.
-
selectLast
Will only apply the last node matched.- Returns:
- the builder to build the nodes.
-
selectIndex
Will only apply the n'th node matched.- Parameters:
index
- index of node to match (is 0-based)- Returns:
- the builder to build the nodes.
-
selectRange
Will only apply the node in the index range matched.- Parameters:
from
- from index of node to start matching (inclusive)to
- to index of node to stop matching (inclusive)- Returns:
- the builder to build the nodes.
-
maxDeep
Will only apply for nodes maximum levels deep. The first level is 1, and level 2 is the children of the first level nodes, and so on. Use zero or negative value for unbounded level.- Parameters:
maxDeep
- the maximum levels to traverse deep in the Camel route tree.- Returns:
- the builder to build the nodes.
-
replace
Replaces the matched node(s) with the following nodes.- Returns:
- the builder to build the nodes.
-
remove
public void remove()Removes the matched node(s) -
before
Insert the following node(s) before the matched node(s)- Returns:
- the builder to build the nodes.
-
after
Insert the following node(s) after the matched node(s)- Returns:
- the builder to build the nodes.
-