org.apache.camel.builder
Class AdviceWithBuilder<T extends ProcessorDefinition<?>>

java.lang.Object
  extended by org.apache.camel.builder.AdviceWithBuilder<T>

public class AdviceWithBuilder<T extends ProcessorDefinition<?>>
extends Object

A builder when using the advice with feature.


Constructor Summary
AdviceWithBuilder(AdviceWithRouteBuilder builder, String id, String toString, Class<T> type)
           
 
Method Summary
 ProcessorDefinition<?> after()
          Insert the following node(s) after the matched node(s)
 ProcessorDefinition<?> before()
          Insert the following node(s) before the matched node(s)
 void remove()
          Removes the matched node(s)
 ProcessorDefinition<?> replace()
          Replaces the matched node(s) with the following nodes.
 AdviceWithBuilder<T> selectFirst()
          Will only apply the first node matched.
 AdviceWithBuilder<T> selectIndex(int index)
          Will only apply the n'th node matched.
 AdviceWithBuilder<T> selectLast()
          Will only apply the last node matched.
 AdviceWithBuilder<T> selectRange(int from, int to)
          Will only apply the node in the index range matched.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdviceWithBuilder

public AdviceWithBuilder(AdviceWithRouteBuilder builder,
                         String id,
                         String toString,
                         Class<T> type)
Method Detail

selectFirst

public AdviceWithBuilder<T> selectFirst()
Will only apply the first node matched.

Returns:
the builder to build the nodes.

selectLast

public AdviceWithBuilder<T> selectLast()
Will only apply the last node matched.

Returns:
the builder to build the nodes.

selectIndex

public AdviceWithBuilder<T> selectIndex(int index)
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

public AdviceWithBuilder<T> selectRange(int from,
                                        int to)
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.

replace

public ProcessorDefinition<?> 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

public ProcessorDefinition<?> before()
Insert the following node(s) before the matched node(s)

Returns:
the builder to build the nodes.

after

public ProcessorDefinition<?> after()
Insert the following node(s) after the matched node(s)

Returns:
the builder to build the nodes.


Apache CAMEL