Interface Model

    • Method Detail

      • getRouteDefinition

        RouteDefinition getRouteDefinition​(String id)
        Gets the route definition with the given id
        Parameters:
        id - id of the route
        Returns:
        the route definition or null if not found
      • addRouteDefinitions

        void addRouteDefinitions​(Collection<RouteDefinition> routeDefinitions)
                          throws Exception
        Adds a collection of route definitions to the context

        Important: Each route in the same CamelContext must have an unique route id. If you use the API from CamelContext or Model to add routes, then any new routes which has a route id that matches an old route, then the old route is replaced by the new route.

        Parameters:
        routeDefinitions - the route(s) definition to add
        Throws:
        Exception - if the route definitions could not be added for whatever reason
      • addRouteDefinition

        void addRouteDefinition​(RouteDefinition routeDefinition)
                         throws Exception
        Add a route definition to the context

        Important: Each route in the same CamelContext must have an unique route id. If you use the API from CamelContext or Model to add routes, then any new routes which has a route id that matches an old route, then the old route is replaced by the new route.

        Parameters:
        routeDefinition - the route definition to add
        Throws:
        Exception - if the route definition could not be added for whatever reason
      • removeRouteDefinitions

        void removeRouteDefinitions​(Collection<RouteDefinition> routeDefinitions)
                             throws Exception
        Removes a collection of route definitions from the context - stopping any previously running routes if any of them are actively running
        Parameters:
        routeDefinitions - route(s) definitions to remove
        Throws:
        Exception - if the route definitions could not be removed for whatever reason
      • removeRouteDefinition

        void removeRouteDefinition​(RouteDefinition routeDefinition)
                            throws Exception
        Removes a route definition from the context - stopping any previously running routes if any of them are actively running
        Parameters:
        routeDefinition - route definition to remove
        Throws:
        Exception - if the route definition could not be removed for whatever reason
      • addRestDefinitions

        void addRestDefinitions​(Collection<RestDefinition> restDefinitions,
                                boolean addToRoutes)
                         throws Exception
        Adds a collection of rest definitions to the context
        Parameters:
        restDefinitions - the rest(s) definition to add
        addToRoutes - whether the rests should also automatically be added as routes
        Throws:
        Exception - if the rest definitions could not be created for whatever reason
      • resolveDataFormatDefinition

        DataFormatDefinition resolveDataFormatDefinition​(String name)
        Resolve a data format definition given its name
        Parameters:
        name - the data format definition name or a reference to it in the Registry
        Returns:
        the resolved data format definition, or null if not found
      • getProcessorDefinition

        ProcessorDefinition<?> getProcessorDefinition​(String id)
        Gets the processor definition from any of the routes which with the given id
        Parameters:
        id - id of the processor definition
        Returns:
        the processor definition or null if not found
      • getProcessorDefinition

        <T extends ProcessorDefinition<T>> T getProcessorDefinition​(String id,
                                                                    Class<T> type)
        Gets the processor definition from any of the routes which with the given id
        Parameters:
        id - id of the processor definition
        type - the processor definition type
        Returns:
        the processor definition or null if not found
        Throws:
        ClassCastException - is thrown if the type is not correct type
      • getHystrixConfiguration

        HystrixConfigurationDefinition getHystrixConfiguration​(String id)
        Gets the Hystrix configuration by the given name. If no name is given the default configuration is returned, see setHystrixConfiguration
        Parameters:
        id - id of the configuration, or null to return the default configuration
        Returns:
        the configuration, or null if no configuration has been registered
      • getResilience4jConfiguration

        Resilience4jConfigurationDefinition getResilience4jConfiguration​(String id)
        Gets the Resilience4j configuration by the given name. If no name is given the default configuration is returned, see setResilience4jConfiguration
        Parameters:
        id - id of the configuration, or null to return the default configuration
        Returns:
        the configuration, or null if no configuration has been registered
      • getFaultToleranceConfiguration

        FaultToleranceConfigurationDefinition getFaultToleranceConfiguration​(String id)
        Gets the MicroProfile Fault Tolerance configuration by the given name. If no name is given the default configuration is returned, see setFaultToleranceConfigurationDefinition
        Parameters:
        id - id of the configuration, or null to return the default configuration
        Returns:
        the configuration, or null if no configuration has been registered
      • getServiceCallConfiguration

        ServiceCallConfigurationDefinition getServiceCallConfiguration​(String serviceName)
        Gets the service call configuration by the given name. If no name is given the default configuration is returned, see setServiceCallConfiguration
        Parameters:
        serviceName - name of service, or null to return the default configuration
        Returns:
        the configuration, or null if no configuration has been registered
      • setRouteFilterPattern

        void setRouteFilterPattern​(String include,
                                   String exclude)
        Used for filtering routes routes matching the given pattern, which follows the following rules: - Match by route id - Match by route input endpoint uri The matching is using exact match, by wildcard and regular expression as documented by PatternHelper.matchPattern(String, String). For example to only include routes which starts with foo in their route id's, use: include=foo* And to exclude routes which starts from JMS endpoints, use: exclude=jms:* Exclude takes precedence over include.
        Parameters:
        include - the include pattern
        exclude - the exclude pattern