Interface Route

    • Method Detail

      • getId

        String getId()
        Gets the route id
        Returns:
        the route id
      • getGroup

        String getGroup()
        Gets the route group
        Returns:
        the route group
      • getUptime

        String getUptime()
        Gets the uptime in a human readable format
        Returns:
        the uptime in days/hours/minutes
      • getUptimeMillis

        long getUptimeMillis()
        Gets the uptime in milliseconds
        Returns:
        the uptime in milliseconds
      • getConsumer

        Consumer getConsumer()
        Gets the inbound Consumer
        Returns:
        the inbound consumer
      • supportsSuspension

        boolean supportsSuspension()
        Whether or not the route supports suspension (suspend and resume)
        Returns:
        true if this route supports suspension
      • getProperties

        Map<String,​Object> getProperties()
        This property map is used to associate information about the route.
        Returns:
        properties
      • getDescription

        String getDescription()
        Gets the route description (if any has been configured).

        The description is configured using the DESCRIPTION_PROPERTY as key in the getProperties().

        Returns:
        the description, or null if no description has been configured.
      • getCamelContext

        CamelContext getCamelContext()
        Gets the camel context
        Returns:
        the camel context
      • getEndpoint

        Endpoint getEndpoint()
        Gets the input endpoint for this route.
        Returns:
        the endpoint
      • onStartingServices

        void onStartingServices​(List<Service> services)
                         throws Exception
        A strategy callback allowing special initialization when services are starting.
        Parameters:
        services - the service
        Throws:
        Exception - is thrown in case of error
      • getServices

        List<Service> getServices()
        Returns the services for this particular route
        Returns:
        the services
      • addService

        void addService​(Service service)
        Adds a service to this route
        Parameters:
        service - the service
      • filter

        List<Processor> filter​(String pattern)
        Returns a list of all the Processors from this route that has id's matching the pattern
        Parameters:
        pattern - the pattern to match by ids
        Returns:
        a list of Processor, is never null.
      • warmUp

        void warmUp()
        Callback preparing the route to be started, by warming up the route.
      • getLastError

        RouteError getLastError()
        Gets the last error.
        Returns:
        the error
      • setLastError

        void setLastError​(RouteError error)
        Sets the last error.
        Parameters:
        error - the error
      • getStartupOrder

        Integer getStartupOrder()
        Gets the route startup order
      • setStartupOrder

        void setStartupOrder​(Integer startupOrder)
        Sets the route startup order
      • setRouteController

        void setRouteController​(RouteController controller)
        Sets the RouteController for this route.
        Parameters:
        controller - the RouteController
      • setAutoStartup

        void setAutoStartup​(Boolean autoStartup)
        Sets whether the route should automatically start when Camel starts.

        Default is true to always start up.

        Specified by:
        setAutoStartup in interface RuntimeConfiguration
        Parameters:
        autoStartup - whether to start up automatically.
      • isAutoStartup

        Boolean isAutoStartup()
        Gets whether the route should automatically start when Camel starts.

        Default is true to always start up.

        Specified by:
        isAutoStartup in interface RuntimeConfiguration
        Returns:
        true if route should automatically start
      • getRouteId

        String getRouteId()
        Gets the route id
      • getRouteDescription

        String getRouteDescription()
        Gets the route description
      • getRoute

        NamedNode getRoute()
        Get the route type
        Returns:
        the route type
      • getEventDrivenProcessors

        List<Processor> getEventDrivenProcessors()
        This method retrieves the event driven Processors on this route context.
      • getInterceptStrategies

        List<InterceptStrategy> getInterceptStrategies()
        This method retrieves the InterceptStrategy instances this route context.
        Returns:
        the strategy
      • setManagementInterceptStrategy

        void setManagementInterceptStrategy​(ManagementInterceptStrategy interceptStrategy)
        Sets a special intercept strategy for management.

        Is by default used to correlate managed performance counters with processors when the runtime route is being constructed

        Parameters:
        interceptStrategy - the managed intercept strategy
      • getManagementInterceptStrategy

        ManagementInterceptStrategy getManagementInterceptStrategy()
        Gets the special managed intercept strategy if any
        Returns:
        the managed intercept strategy, or null if not managed
      • getRoutePolicyList

        List<RoutePolicy> getRoutePolicyList()
        Gets the route policy List
        Returns:
        the route policy list if any
      • setErrorHandlerFactory

        void setErrorHandlerFactory​(ErrorHandlerFactory errorHandlerFactory)
      • setOnCompletion

        void setOnCompletion​(String onCompletionId,
                             Processor processor)
      • setOnException

        void setOnException​(String onExceptionId,
                            Processor processor)
      • addErrorHandler

        void addErrorHandler​(ErrorHandlerFactory factory,
                             NamedNode exception)
        Adds error handler for the given exception type
        Parameters:
        factory - the error handler factory
        exception - the exception to handle
      • getErrorHandlers

        Set<NamedNode> getErrorHandlers​(ErrorHandlerFactory factory)
        Gets the error handlers
        Parameters:
        factory - the error handler factory
      • addErrorHandlerFactoryReference

        void addErrorHandlerFactoryReference​(ErrorHandlerFactory source,
                                             ErrorHandlerFactory target)
        Link the error handlers from a factory to another
        Parameters:
        source - the source factory
        target - the target factory