Annotation Type AdviceRoute


  • @Documented
    @Inherited
    @Retention(RUNTIME)
    @Target(TYPE)
    public @interface AdviceRoute
    A special annotation meant for the class of type AdviceWithRouteBuilder in order to provide the id of the route to advice but also to indicate that the start-up of the Camel context needs to be delayed to advice properly the route.

    In the next example, the AdviceWithRouteBuilder of type ReplaceDirectWithMockBuilder advises the route whose identifier is main-route.

     
    
     @AdviceRoute("main-route")
     public class ReplaceDirectWithMockBuilder extends AdviceWithRouteBuilder {
    
         @Override
         public void configure() throws Exception {
             weaveByToUri("direct:out").replace().to("mock:test");
         }
     }
     
     
    See Also:
    AdviceWithRouteBuilder
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      String value  
    • Element Detail

      • value

        String value
        Returns:
        the id of the route to advice.