org.apache.camel.model
Class RouteDefinitionHelper

java.lang.Object
  extended by org.apache.camel.model.RouteDefinitionHelper

public final class RouteDefinitionHelper
extends Object

Helper for RouteDefinition

Utility methods to help preparing RouteDefinition before they are added to CamelContext.


Method Summary
static void forceAssignIds(CamelContext context, ProcessorDefinition processor)
          Force assigning ids to the give node and all its children (recursively).
static void initParent(ProcessorDefinition parent)
           
static void initParentAndErrorHandlerBuilder(ProcessorDefinition parent, ErrorHandlerBuilder builder)
           
static void prepareRoute(CamelContext context, RouteDefinition route)
          Prepares the route.
static void prepareRoute(CamelContext context, RouteDefinition route, List<OnExceptionDefinition> onExceptions, List<InterceptDefinition> intercepts, List<InterceptFromDefinition> interceptFromDefinitions, List<InterceptSendToEndpointDefinition> interceptSendToEndpointDefinitions, List<OnCompletionDefinition> onCompletions)
          Prepares the route which supports context scoped features such as onException, interceptors and onCompletions

This method does not mark the route as prepared afterwards.

static void prepareRouteForInit(RouteDefinition route, List<ProcessorDefinition> abstracts, List<ProcessorDefinition> lower)
           
static void sanityCheckRoute(RouteDefinition route)
          Sanity check the route, that it has input(s) and outputs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

initParent

public static void initParent(ProcessorDefinition parent)

initParentAndErrorHandlerBuilder

public static void initParentAndErrorHandlerBuilder(ProcessorDefinition parent,
                                                    ErrorHandlerBuilder builder)

prepareRouteForInit

public static void prepareRouteForInit(RouteDefinition route,
                                       List<ProcessorDefinition> abstracts,
                                       List<ProcessorDefinition> lower)

prepareRoute

public static void prepareRoute(CamelContext context,
                                RouteDefinition route)
Prepares the route.

This method does not mark the route as prepared afterwards.

Parameters:
context - the camel context
route - the route

prepareRoute

public static void prepareRoute(CamelContext context,
                                RouteDefinition route,
                                List<OnExceptionDefinition> onExceptions,
                                List<InterceptDefinition> intercepts,
                                List<InterceptFromDefinition> interceptFromDefinitions,
                                List<InterceptSendToEndpointDefinition> interceptSendToEndpointDefinitions,
                                List<OnCompletionDefinition> onCompletions)
Prepares the route which supports context scoped features such as onException, interceptors and onCompletions

This method does not mark the route as prepared afterwards.

Parameters:
context - the camel context
route - the route
onExceptions - optional list of onExceptions
intercepts - optional list of interceptors
interceptFromDefinitions - optional list of interceptFroms
interceptSendToEndpointDefinitions - optional list of interceptSendToEndpoints
onCompletions - optional list onCompletions

sanityCheckRoute

public static void sanityCheckRoute(RouteDefinition route)
Sanity check the route, that it has input(s) and outputs.

Parameters:
route - the route
Throws:
IllegalArgumentException - is thrown if the route is invalid

forceAssignIds

public static void forceAssignIds(CamelContext context,
                                  ProcessorDefinition processor)
Force assigning ids to the give node and all its children (recursively).

This is needed when doing tracing or the likes, where each node should have its id assigned so the tracing can pin point exactly.

Parameters:
context - the camel context
processor - the node


Apache CAMEL